mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Add min y check
This commit is contained in:
parent
68500bf0d0
commit
0ce77673a9
@ -90,7 +90,8 @@ public class BlockPlacementListener {
|
||||
final int offsetZ = blockFace == BlockFace.NORTH ? -1 : blockFace == BlockFace.SOUTH ? 1 : 0;
|
||||
final Point placementPosition = blockPosition.add(offsetX, offsetY, offsetZ);
|
||||
|
||||
if(placementPosition.y() >= instance.getDimensionType().getMaxY()) return;
|
||||
if(placementPosition.y() >= instance.getDimensionType().getMaxY()
|
||||
|| placementPosition.y() <= instance.getDimensionType().getMinY()) return;
|
||||
|
||||
if (!canPlaceBlock) {
|
||||
// Send a block change with the real block in the instance to keep the client in sync,
|
||||
|
Loading…
Reference in New Issue
Block a user