Fix chunk yPos

This commit is contained in:
Jesse Boyd 2019-04-14 21:46:57 +10:00
parent fab197034e
commit f6b844e53c
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 3 additions and 4 deletions

View File

@ -137,8 +137,7 @@ public class BukkitChunk_1_13 extends IntFaweChunk<Chunk, BukkitQueue_1_13> {
}
public ChunkSection copy(ChunkSection current) throws IllegalAccessException, InvocationTargetException, NoSuchFieldException {
int y = current.getYPosition();
ChunkSection newSection = new ChunkSection(y, current.getSkyLightArray() != null);
ChunkSection newSection = new ChunkSection(current.getYPosition(), current.getSkyLightArray() != null);
// Copy light
NibbleArray skyLight = current.getSkyLightArray();

View File

@ -844,9 +844,9 @@ public class BukkitQueue_1_13 extends BukkitQueue_0<net.minecraft.server.v1_13_R
public static ChunkSection newChunkSection(int y2, boolean flag, int[] blocks) {
if (blocks == null) {
return new ChunkSection(y2, flag);
return new ChunkSection(y2 << 4, flag);
} else {
ChunkSection section = new ChunkSection(y2, flag);
ChunkSection section = new ChunkSection(y2 << 4, flag);
int[] blockToPalette = FaweCache.BLOCK_TO_PALETTE.get();
int[] paletteToBlock = FaweCache.PALETTE_TO_BLOCK.get();