mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-29 04:28:21 +01:00
Prevent placing blocks above y=255
This commit is contained in:
parent
72d941bc74
commit
0ae656c1f2
@ -210,7 +210,7 @@ public class PaletteStorage {
|
||||
8191, 16383, 32767};
|
||||
|
||||
private static void setBlockAt(@NotNull PaletteStorage paletteStorage, int x, int y, int z, short blockId) {
|
||||
if (y < 0) {
|
||||
if (y < 0 || y >= Chunk.CHUNK_SIZE_Y) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ public class PaletteStorage {
|
||||
}
|
||||
|
||||
private static short getBlockAt(@NotNull PaletteStorage paletteStorage, int x, int y, int z) {
|
||||
if (y < 0) {
|
||||
if (y < 0 || y >= Chunk.CHUNK_SIZE_Y) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user