File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
src/main/java/com/cleanroommc/modularui Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 55import com .cleanroommc .modularui .api .drawable .IKey ;
66
77import net .minecraft .client .Minecraft ;
8- import net .minecraft .client .entity .EntityPlayerSP ;
98import net .minecraft .client .gui .FontRenderer ;
109import net .minecraft .client .gui .GuiScreen ;
1110import net .minecraft .client .util .ITooltipFlag ;
11+ import net .minecraft .entity .player .EntityPlayer ;
1212import net .minecraft .item .ItemStack ;
1313import net .minecraft .util .text .TextFormatting ;
1414import net .minecraftforge .fluids .Fluid ;
@@ -33,7 +33,7 @@ public static boolean hasMc() {
3333 return Minecraft .getMinecraft ();
3434 }
3535
36- public static @ Nullable EntityPlayerSP getPlayer () {
36+ public static @ Nullable EntityPlayer getPlayer () {
3737 if (hasMc ()) {
3838 return getMc ().player ;
3939 }
@@ -42,7 +42,7 @@ public static boolean hasMc() {
4242
4343 public static boolean closeScreen () {
4444 if (!hasMc ()) return false ;
45- EntityPlayerSP player = getPlayer ();
45+ EntityPlayer player = getPlayer ();
4646 if (player != null ) {
4747 player .closeScreen ();
4848 return true ;
Original file line number Diff line number Diff line change 1717import com .cleanroommc .modularui .screen .UISettings ;
1818
1919import net .minecraft .client .Minecraft ;
20- import net .minecraft .client .entity .EntityPlayerSP ;
2120import net .minecraft .client .gui .GuiScreen ;
21+ import net .minecraft .entity .player .EntityPlayer ;
2222
2323import org .jetbrains .annotations .ApiStatus ;
2424import org .jetbrains .annotations .NotNull ;
@@ -255,7 +255,7 @@ public boolean hasDraggable() {
255255 }
256256
257257 public boolean isMouseItemEmpty () {
258- EntityPlayerSP player = MCHelper .getPlayer ();
258+ EntityPlayer player = MCHelper .getPlayer ();
259259 return player == null || player .inventory .getItemStack ().isEmpty ();
260260 }
261261
Original file line number Diff line number Diff line change 11package com .cleanroommc .modularui .value .sync ;
22
33import com .cleanroommc .modularui .ModularUI ;
4+ import com .cleanroommc .modularui .network .NetworkUtils ;
45import com .cleanroommc .modularui .screen .ClientScreenHandler ;
56import com .cleanroommc .modularui .screen .ModularContainer ;
67import com .cleanroommc .modularui .widgets .slot .SlotGroup ;
@@ -62,7 +63,7 @@ public void detectAndSendChanges(boolean init) {
6263 }
6364
6465 public void onClose () {
65- if (ClientScreenHandler .guiIsClosing ) {
66+ if (NetworkUtils . isClient () && ClientScreenHandler .guiIsClosing ) {
6667 this .panelSyncManagerMap .values ().forEach (PanelSyncManager ::onClose );
6768 }
6869 }
You can’t perform that action at this time.
0 commit comments