Fix trying to load the client side packet handler, when on the server, hopefully?

This commit is contained in:
Christian 2012-08-26 22:18:57 -04:00
parent 5a6275f0e1
commit 870214000f

View file

@ -92,9 +92,12 @@ public class NetworkModHandler
}
tryCreatingPacketHandler(container, mod.packetHandler(), mod.channels(), null);
if (mod.clientPacketHandlerSpec() != getClientHandlerSpecDefaultValue())
if (FMLCommonHandler.instance().getSide().isClient())
{
tryCreatingPacketHandler(container, mod.clientPacketHandlerSpec().packetHandler(), mod.clientPacketHandlerSpec().channels(), Side.CLIENT);
if (mod.clientPacketHandlerSpec() != getClientHandlerSpecDefaultValue())
{
tryCreatingPacketHandler(container, mod.clientPacketHandlerSpec().packetHandler(), mod.clientPacketHandlerSpec().channels(), Side.CLIENT);
}
}
if (mod.serverPacketHandlerSpec() != getServerHandlerSpecDefaultValue())
{