mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Switch order of sticky check and placeStore check.
sticky check is much less expensive than placeStore, so it's better to ensure that the piston is sticky before doing a placeStore check
This commit is contained in:
parent
44e8efda36
commit
79e93edfef
@ -80,7 +80,7 @@ public class BlockListener implements Listener {
|
||||
public void onBlockPistonRetract(BlockPistonRetractEvent event) {
|
||||
Block block = event.getRetractLocation().getBlock();
|
||||
|
||||
if (mcMMO.placeStore.isTrue(block) && event.isSticky()) {
|
||||
if (event.isSticky() && mcMMO.placeStore.isTrue(block)) {
|
||||
mcMMO.placeStore.setFalse(block);
|
||||
mcMMO.placeStore.setTrue(event.getBlock().getRelative(event.getDirection()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user