proper fall overshooting

This commit is contained in:
Leijurv
2019-02-13 21:11:13 -08:00
parent 5b8a83853d
commit b27d95a615
2 changed files with 63 additions and 3 deletions

View File

@@ -439,11 +439,10 @@ public interface MovementHelper extends ActionCosts, Helper {
}
static void moveTowards(IPlayerContext ctx, MovementState state, BlockPos pos) {
EntityPlayerSP player = ctx.player();
state.setTarget(new MovementTarget(
new Rotation(RotationUtils.calcRotationFromVec3d(player.getPositionEyes(1.0F),
new Rotation(RotationUtils.calcRotationFromVec3d(ctx.playerHead(),
VecUtils.getBlockPosCenter(pos),
new Rotation(player.rotationYaw, player.rotationPitch)).getYaw(), player.rotationPitch),
ctx.playerRotations()).getYaw(), ctx.player().rotationPitch),
false
)).setInput(Input.MOVE_FORWARD, true);
}