mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-28 12:07:42 +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;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ public class CreativeInventoryActionListener {
|
||||
|
||||
short slot = packet.slot;
|
||||
final ItemStack item = packet.item;
|
||||
|
||||
|
||||
if (slot != -1) {
|
||||
// Set item
|
||||
slot = (short) PlayerInventoryUtils.convertSlot(slot, PlayerInventoryUtils.OFFSET);
|
||||
|
Loading…
Reference in New Issue
Block a user