mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +01:00
Change y to be from the dimension
This commit is contained in:
parent
4dc7d5972f
commit
ae454a7402
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user