diff --git a/IronChests2/build.xml b/IronChests2/build.xml index 6c0a867..58713d0 100644 --- a/IronChests2/build.xml +++ b/IronChests2/build.xml @@ -13,7 +13,7 @@ - + @@ -33,6 +33,12 @@ + + + + + + @@ -66,9 +72,15 @@ - + - + + + + + + + diff --git a/IronChests2/common/cpw/mods/ironchest/ChestChangerType.java b/IronChests2/common/cpw/mods/ironchest/ChestChangerType.java index 10fbd99..2c6ba11 100644 --- a/IronChests2/common/cpw/mods/ironchest/ChestChangerType.java +++ b/IronChests2/common/cpw/mods/ironchest/ChestChangerType.java @@ -14,7 +14,8 @@ public enum ChestChangerType { IRONGOLD(IRON,GOLD,"ironGoldUpgrade","Iron to Gold Chest Upgrade","mmm","msm","mmm"), GOLDDIAMOND(GOLD,DIAMOND,"goldDiamondUpgrade","Gold to Diamond Chest Upgrade","GGG","msm","GGG"), COPPERSILVER(COPPER,SILVER,"copperSilverUpgrade","Copper to Silver Chest Upgrade","mmm","msm","mmm"), - SILVERGOLD(SILVER,GOLD,"silverGoldUpgrade","Silver to Gold Chest Upgrade","mGm","GsG","mGm"); + SILVERGOLD(SILVER,GOLD,"silverGoldUpgrade","Silver to Gold Chest Upgrade","mGm","GsG","mGm"), + COPPERIRON(COPPER,IRON,"copperIronUpgrade","Copper to Iron Chest Upgrade","mGm","GsG","mGm"); private IronChestType source; private IronChestType target; diff --git a/IronChests2/common/net/minecraft/src/mod_IronChest.java b/IronChests2/common/net/minecraft/src/mod_IronChest.java index 5c57566..e83dfe8 100644 --- a/IronChests2/common/net/minecraft/src/mod_IronChest.java +++ b/IronChests2/common/net/minecraft/src/mod_IronChest.java @@ -1,6 +1,7 @@ package net.minecraft.src; import java.io.File; +import java.lang.reflect.Method; import net.minecraft.src.forge.Configuration; import net.minecraft.src.forge.IOreHandler; @@ -22,7 +23,7 @@ public class mod_IronChest extends BaseModMp { @Override public String getVersion() { - return "2.2"; + return "2.3"; } @Override @@ -77,7 +78,19 @@ public class mod_IronChest extends BaseModMp { @Override public void ModsLoaded() { - + try { + Class equivexmaps=Class.forName("ee.EEMaps"); + Method addEMC=equivexmaps.getMethod("addEMC",int.class,int.class,int.class); + Method addMeta=equivexmaps.getMethod("addMeta",int.class,int.class); + int[] chestEMCValues=new int[] { 8*8+256*8, 8*8+256*8+2048*8, 2*8192+8*8+256*8+2048*8+6, 85*8+8*8, 85*8+8*8+512*8 }; + for (IronChestType icType : IronChestType.values()) { + addEMC.invoke(null,ironChestBlock.blockID,icType.ordinal(),chestEMCValues[icType.ordinal()]); + } + addMeta.invoke(null,ironChestBlock.blockID,IronChestType.values().length-1); + ModLoader.getLogger().fine("mod_IronChest registered chests with Equivalent Exchange"); + } catch (Exception ex) { + ModLoader.getLogger().fine("mod_IronChest unable to load Equivalent Exchange integration"); + } } public static void openGUI(EntityPlayer player, TileEntityIronChest te) { diff --git a/IronChests2/resources/cpw/mods/ironchest/sprites/item_textures.png b/IronChests2/resources/cpw/mods/ironchest/sprites/item_textures.png index 65baf43..fb279ef 100644 Binary files a/IronChests2/resources/cpw/mods/ironchest/sprites/item_textures.png and b/IronChests2/resources/cpw/mods/ironchest/sprites/item_textures.png differ diff --git a/IronChests2/resources/itemsheet.xcf b/IronChests2/resources/itemsheet.xcf index 7f86204..47073b8 100644 Binary files a/IronChests2/resources/itemsheet.xcf and b/IronChests2/resources/itemsheet.xcf differ