Fix up queues

This commit is contained in:
dordsor21 2022-01-26 13:35:34 +00:00 committed by Jordan
parent 0d468505bb
commit 9f4bdaef40
3 changed files with 10 additions and 13 deletions

View File

@ -179,7 +179,7 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
}
}
}
for (int layer = 0; layer < localChunk.getBaseblocks().length; layer++) {
for (int layer = 0; layer < localChunk.getBiomes().length; layer++) {
BiomeType[] biomesLayer = localChunk.getBiomes()[layer];
if (biomesLayer == null) {
continue;

View File

@ -54,7 +54,7 @@ public class LocalChunk {
this.x = x;
this.z = z;
this.minSection = parent.getWorld() != null ? (parent.getWorld().getMinY() >> 4) : 0;
int sections = parent.getWorld() != null ? (parent.getWorld().getMaxY() >> 4) - minSection : 16;
int sections = parent.getWorld() != null ? (parent.getWorld().getMaxY() >> 4) - minSection + 1 : 16;
baseblocks = new BaseBlock[sections][];
biomes = new BiomeType[sections][];
}

View File

@ -47,17 +47,14 @@ public class ChunkUtil {
x_loc = new short[4096];
y_loc = new short[4096];
z_loc = new short[4096];
for (int i = 0; i < 16; i++) {
int i4 = i << 4;
for (int j = 0; j < 4096; j++) {
int y = i4 + (j >> 8);
int a = j - ((y & 0xF) << 8);
int z1 = a >> 4;
int x1 = a - (z1 << 4);
x_loc[j] = (short) x1;
y_loc[j] = (short) y;
z_loc[j] = (short) z1;
}
for (int j = 0; j < 4096; j++) {
int y = j >> 8;
int a = j - ((y & 0xF) << 8);
int z1 = a >> 4;
int x1 = a - (z1 << 4);
x_loc[j] = (short) x1;
y_loc[j] = (short) y;
z_loc[j] = (short) z1;
}
CACHE_J = new short[16][16][16];
for (int x = 0; x < 16; x++) {