diff --git a/IronChests2/.gitignore b/IronChests2/.gitignore index a5b72b5..2dbd679 100644 --- a/IronChests2/.gitignore +++ b/IronChests2/.gitignore @@ -4,3 +4,5 @@ bin/ /target /build.properties /build +/ironchestversion.properties +/tmpbukkit diff --git a/IronChests2/build.xml b/IronChests2/build.xml index 0182a03..8bb149c 100644 --- a/IronChests2/build.xml +++ b/IronChests2/build.xml @@ -1,11 +1,11 @@ - Iron Chest @@ -29,9 +29,10 @@ + - + @@ -51,10 +52,10 @@ - + - + @@ -65,14 +66,9 @@ - + - - - - - @@ -88,7 +84,7 @@ - + @@ -172,7 +168,7 @@ - + @@ -192,44 +188,27 @@ - - + + + - - - - - - - - - - + + + - - - - - - - - - - - - - - - - + + + + + + + - - diff --git a/IronChests2/common/cpw/mods/ironchest/ChestChangerType.java b/IronChests2/common/cpw/mods/ironchest/ChestChangerType.java index cfc24bf..a92c5f8 100644 --- a/IronChests2/common/cpw/mods/ironchest/ChestChangerType.java +++ b/IronChests2/common/cpw/mods/ironchest/ChestChangerType.java @@ -52,7 +52,7 @@ public enum ChestChangerType { } public ItemChestChanger buildItem(Configuration cfg, int id) { - int itemId = Integer.parseInt(cfg.getOrCreateIntProperty(itemName, Configuration.CATEGORY_ITEM, id).value); + int itemId = cfg.getOrCreateIntProperty(itemName, Configuration.CATEGORY_ITEM, id).getInt(id); item = new ItemChestChanger(itemId, this); return item; } diff --git a/IronChests2/common/cpw/mods/ironchest/IronChestType.java b/IronChests2/common/cpw/mods/ironchest/IronChestType.java index 417fa73..347b73e 100644 --- a/IronChests2/common/cpw/mods/ironchest/IronChestType.java +++ b/IronChests2/common/cpw/mods/ironchest/IronChestType.java @@ -25,7 +25,7 @@ public enum IronChestType { GOLD(81, 9, true, "Gold Chest", "goldchest.png", 1, Arrays.asList("ingotGold"), TileEntityGoldChest.class, "mmmmPmmmm", "mGmG4GmGm"), DIAMOND(108, 12, true, "Diamond Chest", "diamondchest.png", 2, Arrays.asList("gemDiamond"), TileEntityDiamondChest.class, "GGGmPmGGG", "GGGG4Gmmm"), COPPER(45, 9, false, "Copper Chest", "copperchest.png", 3, Arrays.asList("ingotCopper"), TileEntityCopperChest.class, "mmmmCmmmm"), - SILVER(72, 9, false, "Silver Chest", "silverchest.png", 4, Arrays.asList("ingotSilver"), TileEntitySilverChest.class, "mmmm0mmmm", "mGmG3GmGm"), + SILVER(72, 9, false, "Silver Chest", "silverchest.png", 4, Arrays.asList("ingotSilver"), TileEntitySilverChest.class, "mmmm3mmmm", "mGmG0GmGm"), CRYSTAL(108, 12, true, "Crystal Chest", "crystalchest.png", 5, Arrays.asList("blockGlass"), TileEntityCrystalChest.class, "GGGGPGGGG"), WOOD(0,0,false,"","",-1,Arrays.asList("blockPlanks"),null); int size; diff --git a/IronChests2/common/cpw/mods/ironchest/ItemChestChanger.java b/IronChests2/common/cpw/mods/ironchest/ItemChestChanger.java index 73ff892..0cb7e4a 100644 --- a/IronChests2/common/cpw/mods/ironchest/ItemChestChanger.java +++ b/IronChests2/common/cpw/mods/ironchest/ItemChestChanger.java @@ -10,7 +10,6 @@ ******************************************************************************/ package cpw.mods.ironchest; -import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.ReflectionHelper; import net.minecraft.src.EntityPlayer; import net.minecraft.src.Item; diff --git a/IronChests2/common/cpw/mods/ironchest/mod_IronChest.java b/IronChests2/common/cpw/mods/ironchest/mod_IronChest.java index 38557e9..6055d11 100644 --- a/IronChests2/common/cpw/mods/ironchest/mod_IronChest.java +++ b/IronChests2/common/cpw/mods/ironchest/mod_IronChest.java @@ -37,7 +37,7 @@ public class mod_IronChest extends NetworkMod { @Override public void load() { - MinecraftForge.versionDetect("IronChest", 3, 3, 7); + MinecraftForge.versionDetect("IronChest", 3, 3, 8); ModContainer fml=ModLoaderModContainer.findContainerFor(this); if (fml.getMetadata()!=null) { fml.getMetadata().version=Version.fullVersionString(); @@ -47,9 +47,9 @@ public class mod_IronChest extends NetworkMod { Configuration cfg = new Configuration(cfgFile); try { cfg.load(); - int bId = cfg.getOrCreateBlockIdProperty("ironChests", 502).getInt(502); + int bId = cfg.getOrCreateBlockIdProperty("ironChests", 181).getInt(181); ironChestBlock = new BlockIronChest(bId); - ChestChangerType.buildItems(cfg, 19501); + ChestChangerType.buildItems(cfg, 29501); } catch (Exception e) { ModLoader.getLogger().severe("IronChest was unable to load it's configuration successfully"); e.printStackTrace(System.err); diff --git a/IronChests2/getversion.py b/IronChests2/getversion.py index 5b10b65..664fdee 100644 --- a/IronChests2/getversion.py +++ b/IronChests2/getversion.py @@ -5,6 +5,15 @@ import fnmatch import re import subprocess, shlex +mcp_home = sys.argv[1] +mcp_dir = os.path.abspath(mcp_home) + +print(mcp_dir) +sys.path.append(mcp_dir) + +from runtime.commands import Commands +Commands._version_config = os.path.join(mcp_dir,Commands._version_config) + def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') @@ -35,12 +44,19 @@ def main(): print("Git not found") vers="v1.0-0-deadbeef" (major,minor,rev,githash)=re.match("v(\d+).(\d+)-(\d+)-(.*)",vers).groups() + + (mcpversion,mcclientversion,mcserverversion) = re.match("[.\w]+ \(data: ([.\w]+), client: ([.\w.]+), server: ([.\w.]+)\)",Commands.fullversion()).groups() + with open("ironchestversion.properties","w") as f: f.write("%s=%s\n" %("ironchest.build.major.number",major)) f.write("%s=%s\n" %("ironchest.build.minor.number",minor)) f.write("%s=%s\n" %("ironchest.build.revision.number",rev)) f.write("%s=%s\n" %("ironchest.build.githash",githash)) - f.write("%s=%s\n" %("ironchest.build.mcversion","1.2.5")) + f.write("%s=%s\n" %("ironchest.build.mcpversion",mcpversion)) + f.write("%s=%s\n" %("ironchest.build.mcclientversion",mcclientversion)) + f.write("%s=%s\n" %("ironchest.build.mcserverversion",mcserverversion)) + + print("Version information: IronChest %s.%s.%s using MCP %s for c:%s, s:%s" % (major, minor, rev, mcpversion, mcclientversion, mcserverversion)) if __name__ == '__main__': main()