Small change.
This commit is contained in:
@@ -661,8 +661,7 @@ public interface MovementHelper extends ActionCosts, Helper {
|
||||
)).setInput(Input.MOVE_FORWARD, true);
|
||||
}
|
||||
|
||||
static void moveTowardsWithRotation(IPlayerContext ctx, MovementState state, BlockPos dest, Rotation rotation) {
|
||||
state.setTarget(new MovementTarget(rotation, true));
|
||||
static void moveTowardsWithoutRotation(IPlayerContext ctx, MovementState state, BlockPos dest) {
|
||||
float ax = Mth.sin(ctx.playerRotations().getYaw() * DEG_TO_RAD_F);
|
||||
float az = Mth.cos(ctx.playerRotations().getYaw() * DEG_TO_RAD_F);
|
||||
Rotation blockRotation = RotationUtils.calcRotationFromVec3d(ctx.playerHead(),
|
||||
|
||||
@@ -352,7 +352,7 @@ public class MovementTraverse extends Movement {
|
||||
}
|
||||
return state;
|
||||
}
|
||||
MovementHelper.moveTowardsWithRotation(ctx, state, dest, ctx.playerRotations());
|
||||
MovementHelper.moveTowardsWithoutRotation(ctx, state, dest);
|
||||
return state;
|
||||
// TODO MovementManager.moveTowardsBlock(to); // move towards not look at because if we are bridging for a couple blocks in a row, it is faster if we dont spin around and walk forwards then spin around and place backwards for every block
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user