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