mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-09 09:57:45 +01:00
Move check above placement check
This commit is contained in:
parent
6ca2be1067
commit
4dc7d5972f
@ -129,10 +129,11 @@ public class BlockPlacementListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(placementPosition.y() >= BLOCK_HEIGHT) return;
|
||||||
|
|
||||||
// BlockPlacementRule check
|
// BlockPlacementRule check
|
||||||
Block resultBlock = playerBlockPlaceEvent.getBlock();
|
Block resultBlock = playerBlockPlaceEvent.getBlock();
|
||||||
final BlockPlacementRule blockPlacementRule = BLOCK_MANAGER.getBlockPlacementRule(resultBlock);
|
final BlockPlacementRule blockPlacementRule = BLOCK_MANAGER.getBlockPlacementRule(resultBlock);
|
||||||
if(placementPosition.y() >= BLOCK_HEIGHT) return;
|
|
||||||
if (blockPlacementRule != null) {
|
if (blockPlacementRule != null) {
|
||||||
// Get id from block placement rule instead of the event
|
// Get id from block placement rule instead of the event
|
||||||
resultBlock = blockPlacementRule.blockPlace(instance, resultBlock, blockFace, blockPosition, player);
|
resultBlock = blockPlacementRule.blockPlace(instance, resultBlock, blockFace, blockPosition, player);
|
||||||
|
Loading…
Reference in New Issue
Block a user