Skip to content

Commit

Permalink
Fix movement while riding boats and other entities
Browse files Browse the repository at this point in the history
  • Loading branch information
Motschen committed Dec 11, 2024
1 parent 7d791fa commit 78900ac
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.entity.attribute.EntityAttributes;
import net.minecraft.util.PlayerInput;
import net.minecraft.util.math.MathHelper;
import org.jetbrains.annotations.NotNull;

Expand Down Expand Up @@ -48,11 +49,8 @@ private MovementHandler() {
public void applyMovement(@NotNull ClientPlayerEntity player) {
if (!this.shouldOverrideMovement)
return;
// TODO
// player.input.playerInput.pressingForward = this.pressingForward;
// player.input.pressingBack = this.pressingBack;
// player.input.pressingLeft = this.pressingLeft;
// player.input.pressingRight = this.pressingRight;
player.input.playerInput = new PlayerInput(this.pressingForward, this.pressingBack, this.pressingLeft, this.pressingRight,
player.input.playerInput.jump(), player.input.playerInput.sneak(), player.input.playerInput.sprint());

polarUtil.calculate(this.movementSideways, this.movementForward, this.slowdownFactor);
player.input.movementForward = polarUtil.polarY;
Expand Down

0 comments on commit 78900ac

Please sign in to comment.