Fixed palette breaking with a Y below 0

This commit is contained in:
themode 2020-11-13 03:29:09 +01:00
parent 0ab9c79a28
commit 1e30283733

View File

@ -210,6 +210,10 @@ public class PaletteStorage {
8191, 16383, 32767};
private static void setBlockAt(@NotNull PaletteStorage paletteStorage, int x, int y, int z, short blockId) {
if (y < 0) {
return;
}
x = toChunkCoordinate(x);
z = toChunkCoordinate(z);
@ -251,6 +255,10 @@ public class PaletteStorage {
}
private static short getBlockAt(@NotNull PaletteStorage paletteStorage, int x, int y, int z) {
if (y < 0) {
return 0;
}
x = toChunkCoordinate(x);
z = toChunkCoordinate(z);