OSDN Git Service

Merge branch 'master' of https://scm.sourceforge.jp/gitroot/chemicraft/chemicraft
[chemicraft/chemicraft.git] / common / pcc / chemicraft / base / ChemiCraftBase.java
index 2aad596..ffb1368 100644 (file)
@@ -57,17 +57,18 @@ public class ChemiCraftBase extends ChemiCraft {
        /**
         * CreativeTab of ChemiCraft.
         */
-       public static final CreativeTabs creativeTabAtomsOre = new CreativeTabAtomOres("AtomsOre");
+       public static final CreativeTabs creativeTabAtomOres = new CreativeTabAtomOres("AtomOres");
 
        /**
         * the ItemID.
         */
+       public int atomIngotsID;
        public int atomGrenadeID;
        public int blackSmokeID;
+       public int oreSerarcherID;
        public int dustID;
        public int radiationGunID;
        public int radiationBalletID;
-       public int oreSerarcherID;
        public int raditionGunDataChipID;
 
        /**
@@ -83,6 +84,7 @@ public class ChemiCraftBase extends ChemiCraft {
        /**
         * Variables of Item type.
         */
+       public Item itemAtomIngots;
        public Item itemAtomGrenade;
        public Item itemBlackSmoke;
        public Item itemDust;
@@ -105,7 +107,8 @@ public class ChemiCraftBase extends ChemiCraft {
        /**
         * the Textures.
         */
-       public static final String ORE = ChemiCraft.TEXTURE + "atoms_ore_";
+       public static final String INGOT = ChemiCraft.TEXTURE + "atom_ingots_";
+       public static final String ORE = ChemiCraft.TEXTURE + "atom_ores_";
 
        public ChemiCraftBase() {
                this.registerCompounds = new ChemiCraftRegisterCompounds(this);
@@ -181,6 +184,7 @@ public class ChemiCraftBase extends ChemiCraft {
                        this.atomOresID[i] = ccfgBlock.additionID();
                }
 
+               this.atomIngotsID = ccfgItem.additionID();
                this.atomGrenadeID = ccfgItem.additionID();
                this.dustID = ccfgItem.additionID();
                this.radiationGunID = ccfgItem.additionID();
@@ -205,22 +209,32 @@ public class ChemiCraftBase extends ChemiCraft {
                // API用の処理
                for (int i = 0; i < this.apiBase.getAtomOres().size(); i++) {
                        OreDictionary.registerOre("ore" + this.apiBase.getAtomOresAtomName().get(i), new ItemStack(this.blockAtomOres[i / 16], 1, i % 16));
+                       OreDictionary.registerOre("ingot" + this.apiBase.getAtomOresAtomName().get(i), new ItemStack(this.itemAtomIngots, 1, i ));
                        GameRegistry.registerWorldGenerator(this.apiBase.getAtomOres().get(i));
                }
 
                Iterator<String> langoresItr = this.apiBase.getAtomOresName().iterator();
                while (langoresItr.hasNext()){
                        String lang = langoresItr.next();
-                       ArrayList<String> names = this.apiBase.getAtomOresName().get(lang);
-                       for (int i = 0; i < names.size(); i++) {
-                               ChemiCraftCore.logger.write("AtomOresAddName:" + "Name-" + names.get(i) + "ID-" + (i / 16)+ "/Damage-" + (i - i / 16 * 16) + "/Lang-" + lang,
+                       ArrayList<String> oresName = this.apiBase.getAtomOresName().get(lang);
+                       ArrayList<String> ingotsName = this.apiBase.getAtomIngotsName().get(lang);
+                       for (int i = 0; i < oresName.size(); i++) {
+                               ChemiCraftCore.logger.write("AtomOresAddName:" + "IngotName-" + ingotsName.get(i) + "OreName-" + oresName.get(i) + "ID-" + (i / 16)+ "/Damage-" + (i - i / 16 * 16) + "/Lang-" + lang,
                                                EnumLoggingType.INFO);
 
                                LanguageRegistry.instance().addNameForObject(
                                                new ItemStack(this.atomOresID[i / 16], 1, i % 16),
                                                lang,
-                                               names.get(i)
+                                               oresName.get(i)
+                                               );
+
+                               /*
+                               LanguageRegistry.instance().addNameForObject(
+                                               new ItemStack(this.atomIngotsID, 1, i),
+                                               lang,
+                                               ingotsName.get(i)
                                                );
+                                               */
                        }
                }