Skip to content

Commit

Permalink
Always update storage data
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Nov 27, 2024
1 parent 30499c8 commit 9d5cd04
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ private void handleRelativeArguments(
final boolean relativeDeltaY = (relativeArguments & 1 << REL_DELTA_Y) != 0;
final boolean relativeDeltaZ = (relativeArguments & 1 << REL_DELTA_Z) != 0;

// Update after having used its previous data
storage.setPosition(x, y, z);
storage.setRotation(yaw, pitch);

// Movement
if (relativeDeltaX && relativeDeltaY && relativeDeltaZ) {
if (entityId != null && entityId != tracker(wrapper.user()).clientEntityId()) {
Expand Down Expand Up @@ -517,10 +521,6 @@ private void handleRelativeArguments(
"This will result in incorrect movement for the player. ");
warned = true;
}

// Update at the end
storage.setPosition(x, y, z);
storage.setRotation(yaw, pitch);
}

private int boatTypeFromEntityType(final EntityType type) {
Expand Down

0 comments on commit 9d5cd04

Please sign in to comment.