@@ -79,15 +79,15 @@ public class ClientScreenHandler {
7979 private static long ticks = 0L ;
8080
8181 private static IMuiScreen lastMui ;
82-
82+
8383 public static boolean guiIsClosing ;
8484
8585 // we need to know the actual gui and not some fake bs some other mod overwrites
8686 @ SubscribeEvent (priority = EventPriority .LOWEST )
87- public static void onGuiOpen (GuiOpenEvent event ) {
87+ public void onGuiOpen (GuiOpenEvent event ) {
8888 GuiScreen newGui = event .getGui ();
8989 guiIsClosing = newGui == null ;
90-
90+
9191 defaultContext .reset ();
9292 if (lastMui != null && newGui == null ) {
9393 if (lastMui .getScreen ().getPanelManager ().isOpen ()) {
@@ -130,7 +130,7 @@ public static void onGuiOpen(GuiOpenEvent event) {
130130 }
131131
132132 @ SubscribeEvent
133- public static void onGuiInit (GuiScreenEvent .InitGuiEvent .Post event ) {
133+ public void onGuiInit (GuiScreenEvent .InitGuiEvent .Post event ) {
134134 defaultContext .updateScreenArea (event .getGui ().width , event .getGui ().height );
135135 if (checkGui (event .getGui ())) {
136136 currentScreen .onResize (event .getGui ().width , event .getGui ().height );
@@ -140,14 +140,14 @@ public static void onGuiInit(GuiScreenEvent.InitGuiEvent.Post event) {
140140
141141 // before JEI
142142 @ SubscribeEvent (priority = EventPriority .HIGH )
143- public static void onGuiInputHigh (GuiScreenEvent .KeyboardInputEvent .Pre event ) throws IOException {
143+ public void onGuiInputHigh (GuiScreenEvent .KeyboardInputEvent .Pre event ) throws IOException {
144144 defaultContext .updateEventState ();
145145 inputEvent (event , InputPhase .EARLY );
146146 }
147147
148148 // after JEI
149149 @ SubscribeEvent (priority = EventPriority .LOW )
150- public static void onGuiInputLow (GuiScreenEvent .KeyboardInputEvent .Pre event ) throws IOException {
150+ public void onGuiInputLow (GuiScreenEvent .KeyboardInputEvent .Pre event ) throws IOException {
151151 inputEvent (event , InputPhase .LATE );
152152 }
153153
@@ -160,7 +160,7 @@ private static void inputEvent(GuiScreenEvent.KeyboardInputEvent.Pre event, Inpu
160160
161161 // before JEI
162162 @ SubscribeEvent (priority = EventPriority .HIGH )
163- public static void onGuiInputHigh (GuiScreenEvent .MouseInputEvent .Pre event ) throws IOException {
163+ public void onGuiInputHigh (GuiScreenEvent .MouseInputEvent .Pre event ) throws IOException {
164164 defaultContext .updateEventState ();
165165 if (checkGui (event .getGui ())) currentScreen .getContext ().updateEventState ();
166166 if (handleMouseInput (Mouse .getEventButton (), currentScreen , event .getGui ())) {
@@ -180,7 +180,7 @@ public static void onGuiInputHigh(GuiScreenEvent.MouseInputEvent.Pre event) thro
180180 }
181181
182182 @ SubscribeEvent (priority = EventPriority .LOW )
183- public static void onGuiDraw (GuiScreenEvent .DrawScreenEvent .Pre event ) {
183+ public void onGuiDraw (GuiScreenEvent .DrawScreenEvent .Pre event ) {
184184 int mx = event .getMouseX (), my = event .getMouseY ();
185185 float pt = event .getRenderPartialTicks ();
186186 defaultContext .updateState (mx , my , pt );
@@ -200,7 +200,7 @@ public static void onGuiDraw(GuiScreenEvent.DrawScreenEvent.Post event) {
200200 }
201201
202202 @ SubscribeEvent
203- public static void onTick (TickEvent .ClientTickEvent event ) {
203+ public void onTick (TickEvent .ClientTickEvent event ) {
204204 if (event .phase == TickEvent .Phase .END ) {
205205 OverlayStack .onTick ();
206206 defaultContext .tick ();
@@ -212,7 +212,7 @@ public static void onTick(TickEvent.ClientTickEvent event) {
212212 }
213213
214214 @ SubscribeEvent
215- public static void preDraw (TickEvent .RenderTickEvent event ) {
215+ public void preDraw (TickEvent .RenderTickEvent event ) {
216216 if (event .phase == TickEvent .Phase .START ) {
217217 GL11 .glEnable (GL11 .GL_STENCIL_TEST );
218218 }
@@ -446,7 +446,7 @@ public static void drawContainer(ModularScreen muiScreen, GuiContainer mcScreen,
446446 MinecraftForge .EVENT_BUS .post (new GuiContainerEvent .DrawForeground (mcScreen , mouseX , mouseY ));
447447 GlStateManager .popMatrix ();
448448
449- InventoryPlayer inventoryplayer = Minecraft . getMinecraft (). player .inventory ;
449+ InventoryPlayer inventoryplayer = Platform . getClientPlayer () .inventory ;
450450 ItemStack itemstack = acc .getDraggedStack ().isEmpty () ? inventoryplayer .getItemStack () : acc .getDraggedStack ();
451451 GlStateManager .translate ((float ) x , (float ) y , 0.0F );
452452 if (!itemstack .isEmpty ()) {
0 commit comments