Dieser Commit ist enthalten in:
Jesse Boyd 2019-07-30 07:44:19 +10:00
Ursprung 7967ef4db4
Commit cdb9abc117
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F
4 geänderte Dateien mit 21 neuen und 21 gelöschten Zeilen

Datei anzeigen

@ -41,8 +41,8 @@ import java.util.concurrent.Future;
public class BukkitChunkHolder<T extends Future<T>> extends ChunkHolder {
@Override
public void init(final IQueueExtent extent, final int x, final int z) {
super.init(extent, x, z);
public void init(final IQueueExtent extent, final int chunkX, final int chunkZ) {
super.init(extent, chunkX, chunkZ);
}
@Override

Datei anzeigen

@ -8,7 +8,7 @@ public abstract class ChunkFilterBlock extends SimpleFilterBlock {
super(extent);
}
public abstract ChunkFilterBlock init(int x, int z, IChunkGet chunk);
public abstract ChunkFilterBlock init(int chunkX, int chunkZ, IChunkGet chunk);
public abstract ChunkFilterBlock init(final IChunkGet iget, final IChunkSet iset, final int layer);

Datei anzeigen

@ -20,9 +20,9 @@ public class Flood {
private int[][] queues;
private long[][] visits;
private int x;
private int y;
private int z;
private int chunkX;
private int chunkYLayer;
private int chunkZ;
private ConcurrentLinkedQueue<int[]> queuePool = new ConcurrentLinkedQueue<>();
private final Long2ObjectLinkedOpenHashMap<long[][]> chunkVisits;
@ -52,10 +52,10 @@ public class Flood {
}
}
private void init(int x, int y, int z) {
this.x = x;
this.y = y;
this.z = z;
private void init(int chunkX, int chunkYLayer, int chunkZ) {
this.chunkX = chunkX;
this.chunkYLayer = chunkYLayer;
this.chunkZ = chunkZ;
}
public void start(int x, int y, int z) {
@ -154,8 +154,8 @@ public class Flood {
visit = visits[sectionIndex];
queue = queues[sectionIndex];
if (visit == null || queue == null) {
long pair = MathMan.pairInt(this.x + nextX, this.z + nextZ);
int layer = this.y + nextY;
long pair = MathMan.pairInt(this.chunkX + nextX, this.chunkZ + nextZ);
int layer = this.chunkYLayer + nextY;
if (layer < 0 || layer > 15) {
continue;
}

Datei anzeigen

@ -28,8 +28,8 @@ public abstract class ChunkHolder implements IChunk, Supplier<IChunkGet> {
private IChunkSet set;
private IBlockDelegate delegate;
private IQueueExtent extent;
private int x;
private int z;
private int chunkX;
private int chunkZ;
public ChunkHolder() {
this.delegate = NULL;
@ -62,7 +62,7 @@ public abstract class ChunkHolder implements IChunk, Supplier<IChunkGet> {
if (region != null) {
region.filter(this, filter, block, get, set);
} else {
block = block.init(x, z, get);
block = block.init(chunkX, chunkZ, get);
for (int layer = 0; layer < 16; layer++) {
if (!get.hasSection(layer) || !filter.appliesLayer(this, layer)) continue;
block.init(get, set, layer);
@ -119,7 +119,7 @@ public abstract class ChunkHolder implements IChunk, Supplier<IChunkGet> {
private IChunkGet newGet() {
if (extent instanceof SingleThreadQueueExtent) {
IChunkGet newGet = extent.getCachedGet(x, z, this);
IChunkGet newGet = extent.getCachedGet(chunkX, chunkZ, this);
if (newGet != null) {
return newGet;
}
@ -128,10 +128,10 @@ public abstract class ChunkHolder implements IChunk, Supplier<IChunkGet> {
}
@Override
public void init(final IQueueExtent extent, final int x, final int z) {
public void init(final IQueueExtent extent, final int chunkX, final int chunkZ) {
this.extent = extent;
this.x = x;
this.z = z;
this.chunkX = chunkX;
this.chunkZ = chunkZ;
if (set != null) {
set.reset();
delegate = SET;
@ -147,12 +147,12 @@ public abstract class ChunkHolder implements IChunk, Supplier<IChunkGet> {
@Override
public int getX() {
return x;
return chunkX;
}
@Override
public int getZ() {
return z;
return chunkZ;
}
@Override