fix parkour cost calculation

This commit is contained in:
Leijurv 2018-10-01 19:23:13 -07:00
parent 07eee481cb
commit 4e11d92d19
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -122,7 +122,7 @@ public class MovementParkour extends Movement {
continue; continue;
} }
if (MovementHelper.canPlaceAgainst(againstX, y - 1, againstZ)) { if (MovementHelper.canPlaceAgainst(againstX, y - 1, againstZ)) {
return new MoveResult(destX, y, destZ, costFromJumpDistance(i) + context.placeBlockCost()); return new MoveResult(destX, y, destZ, costFromJumpDistance(4) + context.placeBlockCost());
} }
} }
return IMPOSSIBLE; return IMPOSSIBLE;
@ -137,7 +137,7 @@ public class MovementParkour extends Movement {
case 4: case 4:
return SPRINT_ONE_BLOCK_COST * 4; return SPRINT_ONE_BLOCK_COST * 4;
default: default:
throw new IllegalStateException("LOL"); throw new IllegalStateException("LOL " + dist);
} }
} }