diff --git a/src/main/java/net/minestom/server/instance/palette/PaletteStorage.java b/src/main/java/net/minestom/server/instance/palette/PaletteStorage.java index 0850f2444..458636899 100644 --- a/src/main/java/net/minestom/server/instance/palette/PaletteStorage.java +++ b/src/main/java/net/minestom/server/instance/palette/PaletteStorage.java @@ -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);