From b7e70b936804df4227761db25748d9a58a6c88b7 Mon Sep 17 00:00:00 2001 From: PeytonPlayz595 <106421860+PeytonPlayz595@users.noreply.github.com> Date: Sat, 6 Jul 2024 10:05:15 -0700 Subject: [PATCH] Fix walking with inventory open --- .../java/net/minecraft/util/MovementInputFromOptions.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/teavm/java/net/minecraft/util/MovementInputFromOptions.java b/src/teavm/java/net/minecraft/util/MovementInputFromOptions.java index f5eda05..9dd74f0 100644 --- a/src/teavm/java/net/minecraft/util/MovementInputFromOptions.java +++ b/src/teavm/java/net/minecraft/util/MovementInputFromOptions.java @@ -1,6 +1,7 @@ package net.minecraft.util; import net.PeytonPlayz585.shadow.input.Controller; +import net.minecraft.client.Minecraft; import net.minecraft.client.settings.GameSettings; /**+ @@ -49,8 +50,8 @@ public class MovementInputFromOptions extends MovementInput { --this.moveStrafe; } - this.jump = this.gameSettings.keyBindJump.isKeyDown() || Controller.jump(); - this.sneak = this.gameSettings.keyBindSneak.isKeyDown() || Controller.crouch(); + this.jump = this.gameSettings.keyBindJump.isKeyDown() || (Controller.jump() && Minecraft.getMinecraft().currentScreen == null); + this.sneak = this.gameSettings.keyBindSneak.isKeyDown() || (Controller.crouch() && Minecraft.getMinecraft().currentScreen == null); if (this.sneak) { this.moveStrafe = (float) ((double) this.moveStrafe * 0.3D); this.moveForward = (float) ((double) this.moveForward * 0.3D);