From ae454a7402e2fc994208b83f83c67084d3e5a818 Mon Sep 17 00:00:00 2001 From: nucker Date: Thu, 5 Jan 2023 21:27:05 +0000 Subject: [PATCH] Change y to be from the dimension --- .../net/minestom/server/listener/BlockPlacementListener.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/listener/BlockPlacementListener.java b/src/main/java/net/minestom/server/listener/BlockPlacementListener.java index 28a0f64d4..62f04007f 100644 --- a/src/main/java/net/minestom/server/listener/BlockPlacementListener.java +++ b/src/main/java/net/minestom/server/listener/BlockPlacementListener.java @@ -28,7 +28,6 @@ import net.minestom.server.utils.validate.Check; public class BlockPlacementListener { private static final BlockManager BLOCK_MANAGER = MinecraftServer.getBlockManager(); - private static final double BLOCK_HEIGHT = 320.0; public static void listener(ClientPlayerBlockPlacementPacket packet, Player player) { final PlayerInventory playerInventory = player.getInventory(); @@ -129,7 +128,7 @@ public class BlockPlacementListener { return; } - if(placementPosition.y() >= BLOCK_HEIGHT) return; + if(placementPosition.y() >= instance.getDimensionType().getMaxY()) return; // BlockPlacementRule check Block resultBlock = playerBlockPlaceEvent.getBlock();