diff --git a/src/main/java/de/zonlykroks/advancedscripts/mixin/KeyboardMixin.java b/src/main/java/de/zonlykroks/advancedscripts/mixin/KeyboardMixin.java index 016f24e..e5dad7b 100644 --- a/src/main/java/de/zonlykroks/advancedscripts/mixin/KeyboardMixin.java +++ b/src/main/java/de/zonlykroks/advancedscripts/mixin/KeyboardMixin.java @@ -21,7 +21,7 @@ public class KeyboardMixin { @Inject(method = "onKey", at = @At("HEAD")) public void sendKeyPress(long window, int key, int scancode, int action, int modifiers, CallbackInfo ci) { MinecraftClient client = ((Keyboard) (Object)this).client; - if(client.currentScreen == null) { + if(client.currentScreen == null && action != 2) { PacketByteBuf byteBuf = new PacketByteBuf(Unpooled.buffer()); byteBuf.writeInt(key); byteBuf.writeByte(action);