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:
NuclearW 2012-05-21 02:19:45 -04:00
parent 44e8efda36
commit 79e93edfef

View File

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