OSDN Git Service

AtomGrenadeの変数がおかしかったので修正
authorponkotate <ponkotate@users.sourceforge.jp>
Sat, 22 Dec 2012 09:38:16 +0000 (18:38 +0900)
committerponkotate <ponkotate@users.sourceforge.jp>
Sat, 22 Dec 2012 09:38:16 +0000 (18:38 +0900)
common/chemicraft/ChemiCraft.java
common/chemicraft/ContainerDecompositionTable.java

index 51e8a97..0dd78ee 100644 (file)
@@ -67,7 +67,7 @@ public class ChemiCraft {
        public int atomsID;\r
        public int compoundsID;\r
        public int gasCollectingBottleID;\r
-       public int grenadeID;\r
+       public int atomGrenadeID;\r
 \r
        /**\r
         * BlockID\r
@@ -99,7 +99,7 @@ public class ChemiCraft {
        public static Item itemAtoms;\r
        public static Item itemCompounds;\r
        public static Item itemGasCollectingBottle;\r
-       public static Item itemGrenade;\r
+       public static Item itemAtomGrenade;\r
 \r
        /**\r
         * このmodで使用するTextureのパス\r
@@ -132,7 +132,7 @@ public class ChemiCraft {
                Property atomsIDProp = cfg.getItem("AtomsID", 25000);\r
                Property compoundsIDProp = cfg.getItem("CompoundsID", 25001);\r
                Property gasCollectingBottleIDProp = cfg.getItem("gasCollectingBottleID", 25002);\r
-               Property grenadeIDProp = cfg.getItem("GrenadeID0", 25003);\r
+               Property atomGrenadeIDProp = cfg.getItem("GrenadeID0", 25003);\r
 \r
                Property guiDecompositionTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1000);\r
                Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1001);\r
@@ -147,7 +147,7 @@ public class ChemiCraft {
                this.atomsID = atomsIDProp.getInt();\r
                this.compoundsID = compoundsIDProp.getInt();\r
                this.gasCollectingBottleID = gasCollectingBottleIDProp.getInt();\r
-               this.grenadeID = grenadeIDProp.getInt();\r
+               this.atomGrenadeID = atomGrenadeIDProp.getInt();\r
                this.guiDecompositionTableID = guiDecompositionTableIDProp.getInt();\r
                this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();\r
                this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();\r
@@ -177,7 +177,7 @@ public class ChemiCraft {
                this.itemAtoms = new ItemAtoms(this.atomsID).setItemName("atoms");\r
                this.itemCompounds = new ItemCompounds(this.compoundsID).setItemName("compounds");\r
                this.itemGasCollectingBottle = new ItemGasCollectingBottle(this.gasCollectingBottleID).setItemName("gasCollectingBottle").setIconIndex(0);\r
-               this.itemGrenade = new ItemAtomGrenade(this.grenadeID).setItemName("grenade").setIconIndex(1);\r
+               this.itemAtomGrenade = new ItemAtomGrenade(this.atomGrenadeID).setItemName("grenade").setIconIndex(1);\r
 \r
                // BlockをMinecraftに登録します\r
                GameRegistry.registerBlock(this.blockDecompositionTable);\r
@@ -201,8 +201,8 @@ public class ChemiCraft {
                this.NameAuxiliary.addName(this.itemAtoms, "ja_JP", atomsNameJP);\r
                this.NameAuxiliary.addName(this.itemGasCollectingBottle, "GasCollectingBottle");\r
                this.NameAuxiliary.addName(this.itemGasCollectingBottle, "ja_JP", "集気瓶");\r
-               this.NameAuxiliary.addName(this.itemGrenade, "AtomGrenade");\r
-               this.NameAuxiliary.addName(this.itemGrenade, "元素手榴弾");\r
+               this.NameAuxiliary.addName(this.itemAtomGrenade, "AtomGrenade");\r
+               this.NameAuxiliary.addName(this.itemAtomGrenade, "元素手榴弾");\r
 \r
                // TileEntityを追加します\r
                GameRegistry.registerTileEntity(TileEntityDecompositionTable.class, "DecompositionTable");\r
@@ -216,7 +216,7 @@ public class ChemiCraft {
                //Textureをpreloadします\r
                proxy.registerTextures();\r
 \r
-               ChemiCraftAPI.instance.addMaterialRecipe(new ItemStack[]{new ItemStack(Block.dirt)}, new ItemStack(this.itemGrenade), new NBTRecipeGrenade());\r
+               ChemiCraftAPI.instance.addMaterialRecipe(new ItemStack[]{new ItemStack(Block.dirt)}, new ItemStack(this.itemAtomGrenade), new NBTRecipeGrenade());\r
 \r
        }\r
 \r
@@ -227,6 +227,6 @@ public class ChemiCraft {
        public final static int BORON = 4;\r
        public final static int CARBON = 5;\r
        public final static int NITROGEN = 6;\r
-       public final static int URANIUM = 91;\r
+       public final static int URANIUM = 92;\r
 \r
 }
\ No newline at end of file
index d0d066a..d0622ee 100644 (file)
@@ -80,10 +80,8 @@ public class ContainerDecompositionTable extends Container {
 
        @Override
        public void onCraftMatrixChanged(IInventory par1IInventory){
-               if(ChemiCraftAPI.instance.getCraftingManager().getDecompositionResults(this.inv) != null){
-                       for(int i = 0;i < ChemiCraftAPI.instance.getCraftingManager().getDecompositionResults(this.inv).length;i++){
-                               this.inv.setInventorySlotContents(i, ChemiCraftAPI.instance.getCraftingManager().getDecompositionResults(this.inv)[i]);
-                       }
+               for(int i = 0;i < ChemiCraftAPI.instance.getCraftingManager().getDecompositionResults(this.inv).length;i++){
+                       this.inv.setInventorySlotContents(i, ChemiCraftAPI.instance.getCraftingManager().getDecompositionResults(this.inv)[i]);
                }
                this.inv.setFlag(true);
        }