Browse Source

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

NuclearW 13 years ago
parent
commit
79e93edfef
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/java/com/gmail/nossr50/listeners/BlockListener.java

+ 1 - 1
src/main/java/com/gmail/nossr50/listeners/BlockListener.java

@@ -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()));
         }