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 41
41
" gui.MixinGuiChest" ,
42
42
" gui.MixinGuiContainer" ,
43
43
" gui.MixinGuiIngameForge" ,
44
+ " gui.MixinGuiIngameMenu" ,
44
45
" gui.MixinGuiInventory" ,
45
46
" gui.MixinGuiMainMenu" ,
46
47
" gui.MixinGuiNewChat" ,
You can’t perform that action at this time.
0 commit comments