Don't grab state if we don't need it
This commit is contained in:
parent
de5f6d5fce
commit
c39b6c3fe7
@ -114,7 +114,7 @@ public class MovementDiagonal extends Movement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
IBlockState destInto = context.get(destX, y, destZ);
|
IBlockState destInto = context.get(destX, y, destZ);
|
||||||
IBlockState fromDown = context.get(x, y - 1, z);
|
IBlockState fromDown;
|
||||||
boolean ascend = false;
|
boolean ascend = false;
|
||||||
IBlockState destWalkOn;
|
IBlockState destWalkOn;
|
||||||
boolean descend = false;
|
boolean descend = false;
|
||||||
@ -125,8 +125,10 @@ public class MovementDiagonal extends Movement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
destWalkOn = destInto;
|
destWalkOn = destInto;
|
||||||
|
fromDown = context.get(x, y - 1, z);
|
||||||
} else {
|
} else {
|
||||||
destWalkOn = context.get(destX, y - 1, destZ);
|
destWalkOn = context.get(destX, y - 1, destZ);
|
||||||
|
fromDown = context.get(x, y - 1, z);
|
||||||
boolean standingOnABlock = MovementHelper.mustBeSolidToWalkOn(context, x, y - 1, z, fromDown);
|
boolean standingOnABlock = MovementHelper.mustBeSolidToWalkOn(context, x, y - 1, z, fromDown);
|
||||||
frostWalker = standingOnABlock && MovementHelper.canUseFrostWalker(context, destWalkOn);
|
frostWalker = standingOnABlock && MovementHelper.canUseFrostWalker(context, destWalkOn);
|
||||||
if (!frostWalker && !MovementHelper.canWalkOn(context, destX, y - 1, destZ, destWalkOn)) {
|
if (!frostWalker && !MovementHelper.canWalkOn(context, destX, y - 1, destZ, destWalkOn)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user