From d725492ff0b7da6a578f53342a7faa56836d2f83 Mon Sep 17 00:00:00 2001 From: Mitchell Date: Mon, 26 Jan 2015 19:13:38 -0400 Subject: [PATCH] Possible fix server startup crash Can't test this because when compiling on my computer I get some error to do with git (I don't understand it) If someone wants to test it please do so, I just know the Minecraft class is client side only so I'm guessing that's the reason servers are continuing to crash on startup. --- src/main/java/cpw/mods/ironchest/IronChest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/cpw/mods/ironchest/IronChest.java b/src/main/java/cpw/mods/ironchest/IronChest.java index 1ddd1a6..c190510 100755 --- a/src/main/java/cpw/mods/ironchest/IronChest.java +++ b/src/main/java/cpw/mods/ironchest/IronChest.java @@ -22,6 +22,8 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.fml.common.FMLCommonHandler; +import net.minecraftforge.fml.relauncher.Side; @Mod(modid = "IronChest", name = "Iron Chests", dependencies = "required-after:FML@[7.2,)") public class IronChest @@ -50,7 +52,7 @@ public class IronChest ironChestBlock = new BlockIronChest(); RegistryHelper.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest"); - Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getBlockModelShapes().func_178123_a(ironChestBlock); + if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getBlockModelShapes().func_178123_a(ironChestBlock); for (IronChestType typ : IronChestType.values()) {