3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-02 17:40:09 +01:00

fix region processing

Dieser Commit ist enthalten in:
Jesse Boyd 2019-11-02 13:12:21 +01:00
Ursprung 6ed7923a1e
Commit 2aa7fc543e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F
4 geänderte Dateien mit 5 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -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 {

Datei anzeigen

@ -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;
}

Datei anzeigen

@ -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);
}
/**

Datei anzeigen

@ -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) {