diff --git a/src/main/java/dan200/computercraft/client/gui/NoTermComputerScreen.java b/src/main/java/dan200/computercraft/client/gui/NoTermComputerScreen.java index ca1edee7a..49f101fb0 100644 --- a/src/main/java/dan200/computercraft/client/gui/NoTermComputerScreen.java +++ b/src/main/java/dan200/computercraft/client/gui/NoTermComputerScreen.java @@ -43,6 +43,10 @@ public class NoTermComputerScreen extends Scree @Override protected void init() { + this.passEvents = true; // to allow gui click events pass through mouseHelper protection (see MouseHelper.OnPres:105 code string) + minecraft.mouseHandler.grabMouse(); + minecraft.screen = this; + super.init(); minecraft.keyboardHandler.setSendRepeatsToGui( true ); @@ -66,6 +70,13 @@ public class NoTermComputerScreen extends Scree terminal.update(); } + @Override + public boolean mouseScrolled( double pMouseX, double pMouseY, double pDelta ) + { + minecraft.player.inventory.swapPaint( pDelta ); + return super.mouseScrolled( pMouseX, pMouseY, pDelta ); + } + @Override public void onClose() { diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index 6e87a36ff..55977f889 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -5,3 +5,4 @@ public net.minecraft.client.renderer.FirstPersonRenderer func_228403_a_(Lcom/moj # ClientTableFormatter public net.minecraft.client.gui.NewChatGui func_146234_a(Lnet/minecraft/util/text/ITextComponent;I)V # printChatMessageWithOptionalDeletion public net.minecraft.client.gui.NewChatGui func_146242_c(I)V # deleteChatLine +public net.minecraft.client.Minecraft field_71462_r # currentScreen