File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
java/com/lambda/client/mixin/client/gui Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .lambda .client .mixin .client .gui ;
2+
3+ import com .lambda .client .gui .mc .LambdaGuiAntiDisconnect ;
4+ import com .lambda .client .module .modules .misc .AntiDisconnect ;
5+ import com .lambda .client .util .Wrapper ;
6+ import net .minecraft .client .gui .GuiButton ;
7+ import net .minecraft .client .gui .GuiIngameMenu ;
8+ import net .minecraft .client .gui .GuiScreen ;
9+ import org .spongepowered .asm .mixin .Mixin ;
10+ import org .spongepowered .asm .mixin .injection .At ;
11+ import org .spongepowered .asm .mixin .injection .Inject ;
12+ import org .spongepowered .asm .mixin .injection .callback .CallbackInfo ;
13+
14+ @ Mixin (GuiIngameMenu .class )
15+ public class MixinGuiIngameMenu extends GuiScreen {
16+ @ Inject (method = "actionPerformed" , at = @ At ("HEAD" ), cancellable = true )
17+ public void actionPerformed (GuiButton button , CallbackInfo callbackInfo ) {
18+ if (button .id == 1 ) {
19+ if (AntiDisconnect .INSTANCE .isEnabled ()) {
20+ Wrapper .getMinecraft ().displayGuiScreen (new LambdaGuiAntiDisconnect ());
21+ callbackInfo .cancel ();
22+ }
23+ }
24+ }
25+ }
Original file line number Diff line number Diff line change 4141 " gui.MixinGuiChest" ,
4242 " gui.MixinGuiContainer" ,
4343 " gui.MixinGuiIngameForge" ,
44+ " gui.MixinGuiIngameMenu" ,
4445 " gui.MixinGuiInventory" ,
4546 " gui.MixinGuiMainMenu" ,
4647 " gui.MixinGuiNewChat" ,
You can’t perform that action at this time.
0 commit comments