crucial performance optimization

This commit is contained in:
Leijurv 2018-08-21 16:56:49 -07:00
parent d4a6618b55
commit 4c0d581d7f
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -111,7 +111,7 @@ public class MovementTraverse extends Movement {
return WC + context.placeBlockCost() + getTotalHardnessOfBlocksToBreak(context);
}
}
if (BlockStateInterface.get(src.down()).getBlock().equals(Blocks.SOUL_SAND)) {
if (Blocks.SOUL_SAND.equals(srcDown)) {
return COST_INF; // can't sneak and backplace against soul sand =/
}
WC = WC * SNEAK_ONE_BLOCK_COST / WALK_ONE_BLOCK_COST;//since we are placing, we are sneaking