better protection logic, fix placing outside worldborder

This commit is contained in:
Leijurv
2018-10-12 14:34:33 -07:00
parent c5f5445f4b
commit 6b7a8e2bd3
7 changed files with 41 additions and 15 deletions

View File

@@ -108,7 +108,7 @@ public class MovementTraverse extends Movement {
if (BlockStateInterface.isWater(destOn.getBlock()) && throughWater) {
return COST_INF;
}
if (!context.hasThrowaway()) {
if (!context.canPlaceThrowawayAt(destX, y - 1, destZ)) {
return COST_INF;
}
double hardness1 = MovementHelper.getMiningDurationTicks(context, destX, y, destZ, pb0, false);