mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
fix region processing
This commit is contained in:
parent
6ed7923a1e
commit
2aa7fc543e
@ -46,7 +46,7 @@ public interface IBatchProcessor {
|
||||
if (set.hasSection(layer)) {
|
||||
if (layer == minLayer) {
|
||||
char[] arr = set.getArray(layer);
|
||||
int index = (minY & 15) << 12;
|
||||
int index = (minY & 15) << 8;
|
||||
for (int i = 0; i < index; i++) arr[i] = 0;
|
||||
set.setBlocks(layer, arr);
|
||||
} else {
|
||||
@ -59,7 +59,7 @@ public interface IBatchProcessor {
|
||||
if (set.hasSection(layer)) {
|
||||
if (layer == minLayer) {
|
||||
char[] arr = set.getArray(layer);
|
||||
int index = ((maxY + 1) & 15) << 12;
|
||||
int index = ((maxY + 1) & 15) << 8;
|
||||
for (int i = index; i < arr.length; i++) arr[i] = 0;
|
||||
set.setBlocks(layer, arr);
|
||||
} else {
|
||||
|
@ -14,7 +14,7 @@ public class ChunkCache<T extends Trimable> implements IChunkCache<T> {
|
||||
protected final Long2ObjectLinkedOpenHashMap<WeakReference<T>> getCache;
|
||||
private final IChunkCache<T> delegate;
|
||||
|
||||
protected ChunkCache(IChunkCache<T> delegate) {
|
||||
public ChunkCache(IChunkCache<T> delegate) {
|
||||
this.getCache = new Long2ObjectLinkedOpenHashMap<>();
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
@ -692,11 +692,7 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
}
|
||||
|
||||
public Region[] getCurrentRegions(FaweMaskManager.MaskType type) {
|
||||
BlockVector3 pos1 = BlockVector3.at(20, 20, 20);
|
||||
BlockVector3 pos2 = BlockVector3.at(40, 40, 40);
|
||||
Region[] regions = {new CuboidRegion(getWorld(), pos1, pos2)};
|
||||
return regions;
|
||||
// return WEManager.IMP.getMask(this, type);
|
||||
return WEManager.IMP.getMask(this, type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -670,6 +670,7 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
||||
int bz = chunk.getZ() << 4;
|
||||
int tx = bx + 15;
|
||||
int tz = bz + 15;
|
||||
|
||||
if (bx >= minX && tx <= maxX && bz >= minZ && tz <= maxZ) {
|
||||
// contains all X/Z
|
||||
if (minY <= 0 && maxY >= 255) {
|
||||
|
Loading…
Reference in New Issue
Block a user