diff --git a/IronChests2/build.xml b/IronChests2/build.xml index 501d8b1..7b42132 100644 --- a/IronChests2/build.xml +++ b/IronChests2/build.xml @@ -13,7 +13,7 @@ - + diff --git a/IronChests2/common/cpw/mods/ironchest/BlockIronChest.java b/IronChests2/common/cpw/mods/ironchest/BlockIronChest.java index c35d2b2..4acf6dc 100644 --- a/IronChests2/common/cpw/mods/ironchest/BlockIronChest.java +++ b/IronChests2/common/cpw/mods/ironchest/BlockIronChest.java @@ -25,6 +25,9 @@ public class BlockIronChest extends BlockContainer implements ITextureProvider { setBlockName("IronChest"); setHardness(3.0F); setRequiresSelfNotify(); + if (id>=256) { + disableStats(); + } random=new Random(); } diff --git a/IronChests2/common/net/minecraft/src/mod_IronChest.java b/IronChests2/common/net/minecraft/src/mod_IronChest.java index dcbab5b..05d6762 100644 --- a/IronChests2/common/net/minecraft/src/mod_IronChest.java +++ b/IronChests2/common/net/minecraft/src/mod_IronChest.java @@ -23,18 +23,22 @@ public class mod_IronChest extends BaseModMp { @Override public String getVersion() { - return "3.0"; + return "3.0.1"; } @Override public void load() { - MinecraftForge.versionDetect("IronChest", 1, 3, 4); + MinecraftForge.versionDetect("IronChest", 1, 4, 0); proxy = ServerClientProxy.getProxy(); File cfgFile = new File(proxy.getMinecraftDir(), "config/IronChest.cfg"); Configuration cfg = new Configuration(cfgFile); try { cfg.load(); - ironChestBlock = new BlockIronChest(Integer.parseInt(cfg.getOrCreateBlockIdProperty("ironChests", 181).value)); + int bId=Integer.parseInt(cfg.getOrCreateBlockIdProperty("ironChests", 181).value); + if (bId>=256) { + throw new RuntimeException(String.format("IronChest detected an invalid block id %s\n",bId)); + } + ironChestBlock = new BlockIronChest(bId); ChestChangerType.buildItems(cfg, 19501); IronChestType.initGUIs(cfg); } catch (Exception e) {