Fix costs when assumeWalkOnWater stops us from relying on frostWalker

This commit is contained in:
ZacSharp 2022-09-30 22:40:23 +02:00
parent 3da5bbd267
commit eb697b7a17
No known key found for this signature in database
GPG Key ID: 9453647B005083A3
2 changed files with 2 additions and 1 deletions

View File

@ -135,6 +135,7 @@ public class MovementDiagonal extends Movement {
return;
}
}
frostWalker &= !context.assumeWalkOnWater; // do this after checking for descends because jesus can't prevent the water from freezing, it just prevents us from relying on the water freezing
}
double multiplier = WALK_ONE_BLOCK_COST;
// For either possible soul sand, that affects half of our walking

View File

@ -74,7 +74,7 @@ public class MovementTraverse extends Movement {
IBlockState destOn = context.get(destX, y - 1, destZ);
Block srcDown = context.getBlock(x, y - 1, z);
boolean standingOnABlock = MovementHelper.mustBeSolidToWalkOn(context, x, y-1, z, context.get(x, y-1, z));
boolean frostWalker = standingOnABlock && MovementHelper.canUseFrostWalker(context, destOn);
boolean frostWalker = standingOnABlock && !context.assumeWalkOnWater && MovementHelper.canUseFrostWalker(context, destOn);
if (MovementHelper.canWalkOn(context.bsi, destX, y - 1, destZ, destOn) || frostWalker) { //this is a walk, not a bridge
double WC = WALK_ONE_BLOCK_COST;
boolean water = false;