From c060a4437159bdca4cede8b9b7545b6753c31dbc Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 12 Nov 2013 18:04:25 -0500 Subject: [PATCH 1/2] Don't try and open GUIs on the server. --- .../cpw/mods/fml/common/network/FMLNetworkHandler.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fml/common/cpw/mods/fml/common/network/FMLNetworkHandler.java b/fml/common/cpw/mods/fml/common/network/FMLNetworkHandler.java index 52ea2aed1..4a2cfdacc 100644 --- a/fml/common/cpw/mods/fml/common/network/FMLNetworkHandler.java +++ b/fml/common/cpw/mods/fml/common/network/FMLNetworkHandler.java @@ -351,10 +351,14 @@ public class FMLNetworkHandler { NetworkRegistry.instance().openRemoteGui(mc, (EntityPlayerMP) player, modGuiId, world, x, y, z); } - else + else if (FMLCommonHandler.instance().getSide().equals(Side.CLIENT)) { NetworkRegistry.instance().openLocalGui(mc, player, modGuiId, world, x, y, z); } + else + { + FMLLog.fine("Invalid attempt to open a local GUI on a dedicated server. This is likely a bug. GUIID: %s,%d", mc.getModId(), modGuiId); + } } public static Packet getEntitySpawningPacket(Entity entity) From 56c9c3c77f9bd557f43ddd1014167945a3b580f9 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 13 Nov 2013 07:45:37 -0500 Subject: [PATCH 2/2] Way to go, missing import. *sigh* --- fml/common/cpw/mods/fml/common/network/FMLNetworkHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/fml/common/cpw/mods/fml/common/network/FMLNetworkHandler.java b/fml/common/cpw/mods/fml/common/network/FMLNetworkHandler.java index 4a2cfdacc..61db77b91 100644 --- a/fml/common/cpw/mods/fml/common/network/FMLNetworkHandler.java +++ b/fml/common/cpw/mods/fml/common/network/FMLNetworkHandler.java @@ -49,6 +49,7 @@ import cpw.mods.fml.common.network.FMLPacket.Type; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration; +import cpw.mods.fml.relauncher.Side; public class FMLNetworkHandler {