don't try to place against water, actually fixes #155

This commit is contained in:
Leijurv 2018-09-11 19:05:45 -07:00
parent 9334cf1dd4
commit 0412298555
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -115,6 +115,9 @@ public class MovementTraverse extends Movement {
if (srcDown == Blocks.SOUL_SAND || (srcDown instanceof BlockSlab && !((BlockSlab) srcDown).isDouble())) {
return COST_INF; // can't sneak and backplace against soul sand or half slabs =/
}
if (srcDown == Blocks.FLOWING_WATER || srcDown == Blocks.WATER) {
return COST_INF; // this is obviously impossible
}
WC = WC * SNEAK_ONE_BLOCK_COST / WALK_ONE_BLOCK_COST;//since we are placing, we are sneaking
return WC + context.placeBlockCost() + getTotalHardnessOfBlocksToBreak(context);
}