mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-13 19:50:31 +00:00
Allow using mouse in off-hand pocket computer screen (#918)
This commit is contained in:
parent
2aa70b49c1
commit
647902c019
@ -43,6 +43,10 @@ public class NoTermComputerScreen<T extends ContainerComputerBase> 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<T extends ContainerComputerBase> 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()
|
||||
{
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user