reformatted and fixed stuck on break fall
This commit is contained in:
parent
c486d8241e
commit
6702b44b3e
@ -78,7 +78,7 @@ public class MovementFall extends Movement {
|
||||
}
|
||||
|
||||
BlockPos playerFeet = ctx.playerFeet();
|
||||
Rotation toDest = RotationUtils.calcRotationFromVec3d(ctx.playerHead(), VecUtils.getBlockPosCenter(dest),ctx.playerRotations());
|
||||
Rotation toDest = RotationUtils.calcRotationFromVec3d(ctx.playerHead(), VecUtils.getBlockPosCenter(dest), ctx.playerRotations());
|
||||
Rotation targetRotation = null;
|
||||
Block destBlock = ctx.world().getBlockState(dest).getBlock();
|
||||
boolean isWater = destBlock == Blocks.WATER || destBlock == Blocks.FLOWING_WATER;
|
||||
@ -141,7 +141,7 @@ public class MovementFall extends Movement {
|
||||
}
|
||||
if (targetRotation == null) {
|
||||
Vec3d destCenterOffset = new Vec3d(destCenter.x + 0.125 * avoid.getX(), destCenter.y, destCenter.z + 0.125 * avoid.getZ());
|
||||
state.setTarget(new MovementTarget(RotationUtils.calcRotationFromVec3d(ctx.playerHead(), destCenterOffset,ctx.playerRotations()), false));
|
||||
state.setTarget(new MovementTarget(RotationUtils.calcRotationFromVec3d(ctx.playerHead(), destCenterOffset, ctx.playerRotations()), false));
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ public class MovementPillar extends Movement {
|
||||
IBlockState fromDown = BlockStateInterface.get(ctx, src);
|
||||
if (MovementHelper.isWater(fromDown.getBlock()) && MovementHelper.isWater(ctx, dest)) {
|
||||
// stay centered while swimming up a water column
|
||||
state.setTarget(new MovementState.MovementTarget(RotationUtils.calcRotationFromVec3d(ctx.playerHead(), VecUtils.getBlockPosCenter(dest),ctx.playerRotations()), false));
|
||||
state.setTarget(new MovementState.MovementTarget(RotationUtils.calcRotationFromVec3d(ctx.playerHead(), VecUtils.getBlockPosCenter(dest), ctx.playerRotations()), false));
|
||||
Vec3d destCenter = VecUtils.getBlockPosCenter(dest);
|
||||
if (Math.abs(ctx.player().posX - destCenter.x) > 0.2 || Math.abs(ctx.player().posZ - destCenter.z) > 0.2) {
|
||||
state.setInput(Input.MOVE_FORWARD, true);
|
||||
|
@ -479,6 +479,9 @@ public class PathExecutor implements IPathExecutor, Helper {
|
||||
if (dir.getY() < -3) {
|
||||
return null;
|
||||
}
|
||||
if (!movement.toBreakCached.isEmpty()) {
|
||||
return null; // it's breaking
|
||||
}
|
||||
Vec3i flatDir = new Vec3i(dir.getX(), 0, dir.getZ());
|
||||
int i;
|
||||
outer:
|
||||
|
Loading…
Reference in New Issue
Block a user