OSDN Git Service

Merge branch 'master' of https://scm.sourceforge.jp/gitroot/chemicraft/chemicraft
authorponkotate <ponkotate@users.sourceforge.jp>
Sun, 17 Feb 2013 15:51:04 +0000 (00:51 +0900)
committerponkotate <ponkotate@users.sourceforge.jp>
Sun, 17 Feb 2013 15:51:04 +0000 (00:51 +0900)
Conflicts:
common/pcc/chemicraft/ChemiCraft.java

16 files changed:
common/pcc/chemicraft/ChemiCraft.java
common/pcc/chemicraft/ChemiCraftAPI.java
common/pcc/chemicraft/block/BlockChemicalCombinationTable.java
common/pcc/chemicraft/block/BlockChemicalCraftingTable.java
common/pcc/chemicraft/block/BlockElectrolysisTable.java
common/pcc/chemicraft/block/BlockPyrolysisTable.java
common/pcc/chemicraft/block/BlockToolAndWeaponCraftingTable.java
common/pcc/chemicraft/creativetab/CreativeTabAtomsOre.java [new file with mode: 0644]
common/pcc/chemicraft/creativetab/CreativeTabChemiCraft.java [moved from common/pcc/chemicraft/util/CreativeTabAtoms.java with 71% similarity]
common/pcc/chemicraft/gen/WorldGenAtomsOre.java
common/pcc/chemicraft/item/ItemAtoms.java
common/pcc/chemicraft/item/ItemCompounds.java
common/pcc/chemicraft/item/ItemGasCollectingBottle.java
common/pcc/chemicraft/ore/BlockAtomsOre.java
common/pcc/chemicraft/ore/ItemAtomsOre.java
resources/pcc/chemicraft/blocks/AtomsOre.png

index 5b8ec99..edbf7ae 100644 (file)
@@ -7,6 +7,7 @@ import net.minecraft.item.Item;
 import net.minecraft.item.ItemStack;
 import net.minecraftforge.common.Configuration;
 import net.minecraftforge.common.Property;
+import net.minecraftforge.oredict.OreDictionary;
 import pcc.chemicraft.block.BlockChemicalCombinationTable;
 import pcc.chemicraft.block.BlockChemicalCraftingTable;
 import pcc.chemicraft.block.BlockElectrolysisTable;
@@ -14,6 +15,8 @@ import pcc.chemicraft.block.BlockPyrolysisTable;
 import pcc.chemicraft.block.BlockToolAndWeaponCraftingTable;
 import pcc.chemicraft.compounds.CompoundDebug;
 import pcc.chemicraft.compounds.CompoundWater;
+import pcc.chemicraft.creativetab.CreativeTabAtomsOre;
+import pcc.chemicraft.creativetab.CreativeTabChemiCraft;
 import pcc.chemicraft.debug.CommandDeleteItem;
 import pcc.chemicraft.debug.CommandGenDebugRoom;
 import pcc.chemicraft.debug.CommandSetTile;
@@ -34,7 +37,6 @@ import pcc.chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
 import pcc.chemicraft.util.Auxiliary;
 import pcc.chemicraft.util.Auxiliary.ArrayAuxiliary;
 import pcc.chemicraft.util.Auxiliary.NameAuxiliary;
-import pcc.chemicraft.util.CreativeTabAtoms;
 import pcc.chemicraft.util.NBTRecipeGrenade;
 import cpw.mods.fml.common.Mod;
 import cpw.mods.fml.common.SidedProxy;
@@ -86,7 +88,8 @@ public class ChemiCraft {
        /**
         * ChemiCraftのCreativeTab.
         */
-       public static final CreativeTabs creativeTab = new CreativeTabAtoms("ChemiCraft");
+       public static final CreativeTabs creativeTabChemiCraft = new CreativeTabChemiCraft("ChemiCraft");
+       public static final CreativeTabs creativeTabAtomsOre = new CreativeTabAtomsOre("AtomsOre");
 
        /**
         * ItemID.
@@ -105,7 +108,8 @@ public class ChemiCraft {
        public int toolAndWeaponCraftingTableID;
        public int chemicalCraftingTableID;
 
-       public int[] atomsOreID = new int[1];
+
+       public int[] atomsOreID = new int[16];
 
        /**
         * GUIID.
@@ -342,20 +346,69 @@ public class ChemiCraft {
                });
 
                //鉱石を追加します
-               this.api.addAtomsOre("Petalite", this.atomsOreID[0], 0, 5, 5, 20); //ペタル石を追加
-               this.api.addAtomsOreLanguage("Petalite", "ペタル石", "ja_JP");
 
-               //化合物を追加します
-               this.api.addLangCompound("ja_JP", "ChlorousAcid", "亜塩素酸");
-               this.api.addLangCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");
-               this.api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");
-               this.api.addLangCompound("ja_JP", "Water", "水");
-               this.api.addLangCompound("ja_JP", "SodiumChloride", "塩化ナトリウム");
-               this.api.addLangCompound("ja_JP", "SodiumBicarbonate", "重曹");
-               this.api.addLangCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");
-               this.api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");
-               this.api.addLangCompound("ja_JP", "Water", "水");
+               // リチウム
+               api.addAtomsOre("Petalite", this.atomsOreID[api.getAtomsOreIndex()], 5, 10, 50); // LiAlSi4O10
+               api.addAtomsOreLanguage("Petalite", "ペタル石", "ja_JP");
+               api.addAtomsOre("Spodumene", this.atomsOreID[api.getAtomsOreIndex()], 5, 15, 50); // LiAlSi2O6
+               api.addAtomsOreLanguage("Spodumene", "リチア輝石", "ja_JP");
+
+               // ベリリウム
+               api.addAtomsOre("Beryl", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // Be3Al2Si6O18
+               api.addAtomsOreLanguage("Beryl", "緑柱石", "ja_JP");
+               api.addAtomsOre("Chrysoberyl", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // BeAl2O4
+               api.addAtomsOreLanguage("Chrysoberyl", "金緑石", "ja_JP");
+
+               // ホウ素
+               api.addAtomsOre("Ulexite", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50);   // NaCaB5O6(OH)6・5H2O
+               api.addAtomsOreLanguage("Ulexite", "ウレキサイト", "ja_JP"); // ホウ酸塩鉱石
+
+               // フッ素
+               api.addAtomsOre("Fluorite", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // CaF2
+               api.addAtomsOreLanguage("Fluorite", "蛍石", "ja_JP");
+               api.addAtomsOre("Cryolite", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // Na3AlF6
+               api.addAtomsOreLanguage("Cryolite", "氷晶石", "ja_JP");
+
+               // ナトリウム
+               api.addAtomsOre("RockSalt", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // NaCl
+               api.addAtomsOreLanguage("RockSalt", "岩塩", "ja_JP");
+
+               // マグネシウム
+               api.addAtomsOre("Dolomite", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // CaMg(CO3)2
+               api.addAtomsOreLanguage("Dolomite", "苦灰石", "ja_JP");
+               api.addAtomsOre("Magnesite", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // MgCO3
+               api.addAtomsOreLanguage("Magnesite", "菱苦土石", "ja_JP");
+
+               // アルミニウム
+               api.addAtomsOre("Gibbsite", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // Al(OH)3
+               api.addAtomsOreLanguage("Gibbsite", "ギブス石", "ja_JP");
+               api.addAtomsOre("Ruby", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // Al2O3
+               api.addAtomsOreLanguage("Ruby", "ルビー", "ja_JP");
+               api.addAtomsOre("Sapphire", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // Al2O3
+               api.addAtomsOreLanguage("Sapphire", "サファイア", "ja_JP");
+
+               // ケイ素
+               api.addAtomsOre("Quartz", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // SiO2
+               api.addAtomsOreLanguage("Quartz", "石英", "ja_JP");
+
+               // リン
+               api.addAtomsOre("Fluorapatite", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // Ca5(PO4)3F
+               api.addAtomsOreLanguage("Fluorapatite", "フッ素リン灰石", "ja_JP");
+               api.addAtomsOre("Chlorapatite", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // Ca5(PO4)3Cl
+               api.addAtomsOreLanguage("Chlorapatite", "塩素燐灰石", "ja_JP");
+               api.addAtomsOre("Hydroxylapatite", this.atomsOreID[api.getAtomsOreIndex()], 5, 20, 50); // Ca5(PO4)3(OH)
+               api.addAtomsOreLanguage("Hydroxylapatite", "水酸燐灰石", "ja_JP");
 
+               //化合物を追加します
+               this.api.addCompound("ja_JP", "ChlorousAcid", "亜塩素酸");
+               this.api.addCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");
+               this.api.addCompound("ja_JP", "CarbonDioxide", "二酸化炭素");
+               this.api.addCompound("ja_JP", "Water", "水");
+               this.api.addCompound("ja_JP", "SodiumChloride", "塩化ナトリウム");
+               this.api.addCompound("ja_JP", "SodiumBicarbonate", "重曹");
+               this.api.addCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");
+               this.api.addCompound("ja_JP", "CarbonDioxide", "二酸化炭素");
+               this.api.addCompound("ja_JP", "Water", "水");
 
                //化合物のHandlerを設定します
                this.api.settingCompoundHandler("Water", new CompoundWater());
@@ -395,30 +448,27 @@ public class ChemiCraft {
 
        private void apiProcessing(final FMLPostInitializationEvent event) {
                // API用の処理
-               this.nameAuxiliary.addName(itemCompounds, this.api.getCompoundsName().toArray());
-               for (int i = 0; i < this.api.getCompoundsLang().size(); i++) {
-                       this.nameAuxiliary.addName(itemCompounds, this.api.getCompoundsLang().get(i), this.api.getCompoundsLangName().toArray());
+               for (int i = 0; i < api.getCompoundsName().sizeKeysList(); i++)
+               {
+                       for (int j = 0; j < api.getCompoundsName().sizeElementsList(api.getCompoundsName().getKeyList(i)); j++)
+                       {
+                               this.nameAuxiliary.addName(new ItemStack(itemCompounds, 0, i), api.getCompoundsLang().get(api.getCompoundsName().getKeyList(i), j), api.getCompoundsName().get(api.getCompoundsName().getKeyList(i), j));
+                       }
                }
 
-               for (int i = 0; i < blockAtomsOre.length; i++)
+               for (int i = 0; i < api.getAtomsOreNameListHash().sizeKeysList(); i++)
                {
-                       for (int j = 0; j < api.getAtomsOreNameListHash().sizeKeysList(); j++)
+                       for (int j = 0; j < api.getAtomsOreNameListHash().sizeElementsList(api.getAtomsOreNameListHash().getKeyList(i)); j++)
                        {
-                               for (int k = 0; k < api.getAtomsOreNameListHash().sizeElementsList(api.getAtomsOreNameListHash().getKeyList(j)); k++)
-                               {
-                                       this.nameAuxiliary.addName(new ItemStack(blockAtomsOre[i], 0, j), api.getAtomsOreLangListHash().get(api.getAtomsOreNameListHash().getKeyList(j), k), api.getAtomsOreNameListHash().get(api.getAtomsOreNameListHash().getKeyList(j), k));
-                               }
+                               this.nameAuxiliary.addName(new ItemStack(blockAtomsOre[i / 16], 0, i - i / 16 * 16), api.getAtomsOreLangListHash().get(api.getAtomsOreNameListHash().getKeyList(i), j), api.getAtomsOreNameListHash().get(api.getAtomsOreNameListHash().getKeyList(i), j));
+                               OreDictionary.registerOre("ore" + api.getAtomsOreNameListHash().getKeyList(i), new ItemStack(blockAtomsOre[i / 16], 1, i - i / 16 * 16));
                        }
                }
 
-               /* 動作がおかしかったため一時的にコメントアウト */
-               /*
-               //鉱石の生成
-               for (int i = 0; i < this.api.getAtomsOreIDList().size(); i++) {
-                       GameRegistry.registerWorldGenerator(new WorldGenAtomsOre(this.api.getAtomsOreIDList().get(i), this.api.getAtomsOreMetaList().get(i), this.api.getAtomsOreSizeList().get(i), this.api.getAtomsOreFrequencyList().get(i), this.api.getAtomsOrePosYList().get(i)));
+               for (int i = 0; i < api.getAtomsOres().size(); i++)
+               {
                        GameRegistry.registerWorldGenerator(api.getAtomsOres().get(i));
                }
-                */
 
        }
 
index ca4ed8b..c21ba87 100644 (file)
@@ -30,19 +30,13 @@ public class ChemiCraftAPI {
        /**
         * List of compounds names.
         */
-       private ArrayList<String> compoundsNameList = new ArrayList<String>();
-
-
-       /**
-        * List of compounds names(Some kind of language).
-        */
-       private ArrayList<String> compoundsLangNameList = new ArrayList<String>();
+       private ListHash<String, String> compoundsNameListHash = new ListHash<String, String>();
 
 
        /**
         * List of compounds the language names.
         */
-       private ArrayList<String> compoundsLangList = new ArrayList<String>();
+       private ListHash<String, String> compoundsLangListHash = new ListHash<String, String>();
 
 
        /**
@@ -101,12 +95,6 @@ public class ChemiCraftAPI {
 
 
        /**
-        * 鉱石IDリスト
-        */
-       private ArrayList<Integer> atomsOreIDList = new ArrayList<Integer>();
-
-
-       /**
         * 鉱石の言語リスト
         */
        private ListHash<String, String> atomsOreLangListHash = new ListHash<String, String>();
@@ -143,7 +131,9 @@ public class ChemiCraftAPI {
         * @param name compound name.
         */
        public void addCompound(String name){
-               addLangCompound("", name, "");
+               compoundsNameListHash.add(name, name);
+               compoundsLangListHash.add(name, "en_US");
+               compoundHash.put(name, compoundHash.size());
        }
 
 
@@ -154,11 +144,16 @@ public class ChemiCraftAPI {
         * @param englishName compound name
         * @param langName compound name(specified language)
         */
-       public void addLangCompound(String lang, String englishName, String langName){
-               compoundsNameList.add(englishName);
-               compoundsLangNameList.add(langName);
-               compoundsLangList.add(lang);
-               compoundHash.put(englishName, compoundHash.size());
+       public void addCompound(String lang, String englishName, String langName){
+               addCompound(englishName);
+               addCompoundLanguage(lang, englishName, langName);
+       }
+
+
+
+       public void addCompoundLanguage(String lang, String englishName, String langName){
+               compoundsNameListHash.add(englishName, langName);
+               compoundsLangListHash.add(englishName, lang);
        }
 
 
@@ -277,22 +272,13 @@ public class ChemiCraftAPI {
        /**
         * 鉱石を追加します
         * @param name 鉱石名
-        * @param id 鉱石ID
-        * @param meta 鉱石メタデータ
         * @param size 一度に生成される量
         * @param frequency 生成頻度
         * @param posY Y座標
         */
        public void addAtomsOre(String par1Name, int par2Id, int par3Size, int par4Frequency, int par5PosY){
-               addAtomsOre(par1Name, par2Id, 0, par3Size, par4Frequency, par5PosY);
-       }
-
-
-       public void addAtomsOre(String par1Name, int par2Id, int par3Meta, int par4Size, int par5Frequency, int par6PosY){
-               atomsOreNameListHash.add(par1Name, par1Name);
-               atomsOreIDList.add(par2Id);
-               atomsOreLangListHash.add(par1Name, "en_US");
-               atomsOres.add(new WorldGenAtomsOre(par2Id, par3Meta, par4Size, par5Frequency, par6PosY));
+               atomsOres.add(new WorldGenAtomsOre(par2Id, getAtomsOreMetaOfIndex(), par3Size, par4Frequency, par5PosY));
+               addAtomsOreLanguage(par1Name, par1Name, "en_US");
        }
 
 
@@ -325,23 +311,14 @@ public class ChemiCraftAPI {
 
 
 
-       public ArrayList<String> getCompoundsName(){
-               compoundsNameList.trimToSize();
-               return compoundsNameList;
+       public ListHash<String, String> getCompoundsName(){
+               return compoundsNameListHash;
        }
 
 
 
-       public ArrayList<String> getCompoundsLangName(){
-               compoundsLangNameList.trimToSize();
-               return compoundsLangNameList;
-       }
-
-
-
-       public ArrayList<String> getCompoundsLang(){
-               compoundsLangList.trimToSize();
-               return compoundsLangList;
+       public ListHash<String, String> getCompoundsLang(){
+               return compoundsLangListHash;
        }
 
 
@@ -400,14 +377,20 @@ public class ChemiCraftAPI {
 
 
 
-       public ArrayList<Integer> getAtomsOreIDList(){
-               return atomsOreIDList;
+       public ListHash<String, String> getAtomsOreLangListHash(){
+               return atomsOreLangListHash;
        }
 
 
 
-       public ListHash<String, String> getAtomsOreLangListHash(){
-               return atomsOreLangListHash;
+       public int getAtomsOreIndex(){
+               return atomsOreNameListHash.sizeKeysList() / 16;
+       }
+
+
+
+       public int getAtomsOreMetaOfIndex(){
+               return atomsOreNameListHash.sizeKeysList() - getAtomsOreIndex() * 16;
        }
 
 
index 23c328d..c210065 100644 (file)
@@ -12,7 +12,7 @@ public class BlockChemicalCombinationTable extends BlockContainer {
 
        public BlockChemicalCombinationTable(int par1, int par2, Material par3Material) {
                super(par1, par2, par3Material);
-               this.setCreativeTab(ChemiCraft.creativeTab);
+               this.setCreativeTab(ChemiCraft.creativeTabChemiCraft);
        }
 
        @Override
index 01f759a..281d54f 100644 (file)
@@ -12,7 +12,7 @@ public class BlockChemicalCraftingTable extends BlockContainer {
 
        public BlockChemicalCraftingTable(int par1, int par2, Material par3Material) {
                super(par1, par2, par3Material);
-               this.setCreativeTab(ChemiCraft.creativeTab);
+               this.setCreativeTab(ChemiCraft.creativeTabChemiCraft);
        }
 
 
index c5ffb4b..ce677ee 100644 (file)
@@ -15,7 +15,7 @@ public class BlockElectrolysisTable extends BlockContainer
        public BlockElectrolysisTable(int par1, int par2, Material par3Material)
        {
                super(par1, par2, par3Material);
-               this.setCreativeTab(ChemiCraft.creativeTab);
+               this.setCreativeTab(ChemiCraft.creativeTabChemiCraft);
        }
 
        @Override
index f0718e4..3f3ccde 100644 (file)
@@ -13,7 +13,7 @@ public class BlockPyrolysisTable extends BlockContainer {
 
        public BlockPyrolysisTable(int par1, int par2, Material par3Material) {
                super(par1, par2, par3Material);
-               this.setCreativeTab(ChemiCraft.creativeTab);
+               this.setCreativeTab(ChemiCraft.creativeTabChemiCraft);
        }
 
        @Override
index 1623219..f73a388 100644 (file)
@@ -12,7 +12,7 @@ public class BlockToolAndWeaponCraftingTable extends BlockContainer {
 
        public BlockToolAndWeaponCraftingTable(int par1, int par2, Material par3Material) {
                super(par1, par2, par3Material);
-               this.setCreativeTab(ChemiCraft.creativeTab);
+               this.setCreativeTab(ChemiCraft.creativeTabChemiCraft);
        }
 
        @Override
diff --git a/common/pcc/chemicraft/creativetab/CreativeTabAtomsOre.java b/common/pcc/chemicraft/creativetab/CreativeTabAtomsOre.java
new file mode 100644 (file)
index 0000000..099c511
--- /dev/null
@@ -0,0 +1,33 @@
+package pcc.chemicraft.creativetab;
+
+import net.minecraft.creativetab.CreativeTabs;
+import pcc.chemicraft.ChemiCraft;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class CreativeTabAtomsOre extends CreativeTabs
+{
+
+       public CreativeTabAtomsOre(String type)
+       {
+               super(type);
+       }
+
+
+
+       @Override
+       @SideOnly(Side.CLIENT)
+       public int getTabIconItemIndex(){
+               return ChemiCraft.instance.blockAtomsOre[0].blockID;
+       }
+
+
+
+       @Override
+       @SideOnly(Side.CLIENT)
+       public String getTranslatedTabLabel(){
+               return "AtomsOre";
+       }
+
+
+}
@@ -1,17 +1,18 @@
-package pcc.chemicraft.util;
+package pcc.chemicraft.creativetab;
 
 import net.minecraft.creativetab.CreativeTabs;
 import pcc.chemicraft.ChemiCraft;
 import cpw.mods.fml.relauncher.Side;
 import cpw.mods.fml.relauncher.SideOnly;
 
-public class CreativeTabAtoms extends CreativeTabs {
+public class CreativeTabChemiCraft extends CreativeTabs {
 
-       public CreativeTabAtoms(String type){
+       public CreativeTabChemiCraft(String type){
                super(type);
        }
 
 
+
        @Override
        @SideOnly(Side.CLIENT)
        public int getTabIconItemIndex(){
@@ -23,7 +24,7 @@ public class CreativeTabAtoms extends CreativeTabs {
        @Override
        @SideOnly(Side.CLIENT)
        public String getTranslatedTabLabel(){
-               return "Atoms";
+               return "ChemiCraft";
        }
 
 }
index ac66f54..9587f42 100644 (file)
@@ -10,25 +10,16 @@ import cpw.mods.fml.common.IWorldGenerator;
 public class WorldGenAtomsOre extends WorldGenMinable implements IWorldGenerator
 {
 
-       private int id;
-       private int meta;
-       private int size;
        private int frequency;
        private int posY;
 
-       public WorldGenAtomsOre(int id, int size, int frequency, int posY)
+       public WorldGenAtomsOre(int id, int meta, int size, int frequency, int posY)
        {
-               super(id, size);
+               super(id, meta, size);
                this.frequency = frequency;
                this.posY = posY;
        }
 
-       public WorldGenAtomsOre(int id, int meta, int size, int frequency, int posY)
-       {
-               this(id, size, frequency, posY);
-               this.meta = meta;
-       }
-
        @Override
        public void generate(Random par1Random, int par2ChunkX, int par3ChunkZ, World par4World, IChunkProvider par5ChunkGenerator, IChunkProvider par6ChunkProvider)
        {
index 0a32c3b..4c2357f 100644 (file)
@@ -16,7 +16,7 @@ public class ItemAtoms extends Item {
                this.maxStackSize = 64;
                this.setHasSubtypes(true);
                this.setMaxDamage(0);
-               this.setCreativeTab(ChemiCraft.instance.creativeTab);
+               this.setCreativeTab(ChemiCraft.instance.creativeTabChemiCraft);
        }
 
 
index 6eb6531..267b090 100644 (file)
@@ -19,14 +19,14 @@ public class ItemCompounds extends Item {
                super(par1);
                this.setHasSubtypes(true);
                this.setMaxDamage(0);
-               this.setCreativeTab(ChemiCraft.instance.creativeTab);
+               this.setCreativeTab(ChemiCraft.instance.creativeTabChemiCraft);
        }
 
        @Override
        public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
                try {
                        for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
-                               if(ChemiCraftAPI.instance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
+                               if(ChemiCraftAPI.instance().getCompoundsName().getKeyList(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
                                        return ChemiCraftAPI.instance().getCompoundHandler().get(i).onItemUseHandler(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
                                }
                        }
@@ -42,7 +42,7 @@ public class ItemCompounds extends Item {
        {
                try {
                        for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
-                               if(ChemiCraftAPI.instance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
+                               if(ChemiCraftAPI.instance().getCompoundsName().getKeyList(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
                                        ChemiCraftAPI.instance().getCompoundHandler().get(i).onItemRightClickHandler(par1ItemStack, par2World, par3EntityPlayer);
                                }
                        }
@@ -58,7 +58,7 @@ public class ItemCompounds extends Item {
        public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5){
                try {
                        for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
-                               if(ChemiCraftAPI.instance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
+                               if(ChemiCraftAPI.instance().getCompoundsName().getKeyList(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
                                        ChemiCraftAPI.instance().getCompoundHandler().get(i).onUpdateHandler(par1ItemStack, par2World, par3Entity, par4, par5);
                                }
                        }
@@ -74,7 +74,7 @@ public class ItemCompounds extends Item {
        @SideOnly(Side.CLIENT)
        @Override
        public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List){
-               for(int type = 0; type < ChemiCraftAPI.instance().getCompoundsName().toArray().length; type++)
+               for(int type = 0; type < ChemiCraftAPI.instance().getCompoundsName().sizeKeysList(); type++)
                {
                        par3List.add(new ItemStack(par1, 1, type));
                        this.setIconIndex(type);
@@ -86,7 +86,7 @@ public class ItemCompounds extends Item {
        @Override
        public String getItemNameIS(ItemStack par1ItemStack){
                try {
-                       return super.getItemName() + "." + ChemiCraftAPI.instance().getCompoundsName().toArray()[par1ItemStack.getItemDamage()];
+                       return super.getItemName() + "." + ChemiCraftAPI.instance().getCompoundsName().getKeyList(par1ItemStack.getItemDamage());
                } catch (ArrayIndexOutOfBoundsException e) {
                        par1ItemStack.stackSize = 0;
                }
@@ -107,7 +107,7 @@ public class ItemCompounds extends Item {
        public int getIconFromDamage(int par1){
                try {
                        for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
-                               if(ChemiCraftAPI.instance().getCompoundsName().get(par1).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
+                               if(ChemiCraftAPI.instance().getCompoundsName().getKeyList(par1).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
                                        return ChemiCraftAPI.instance().getCompoundHandler().get(i).getIconIndexHandler();
                                }
                        }
index d87042a..599c729 100644 (file)
@@ -18,7 +18,7 @@ public class ItemGasCollectingBottle extends ItemAtomInfoContainer
                super(id);
                this.setMaxStackSize(1);
                this.setMaxDamage(2);
-               this.setCreativeTab(ChemiCraft.instance.creativeTab);
+               this.setCreativeTab(ChemiCraft.instance.creativeTabChemiCraft);
        }
 
        @Override
index 035be6d..d87ce89 100644 (file)
@@ -16,7 +16,7 @@ public class BlockAtomsOre extends Block
        public BlockAtomsOre(int id)
        {
                super(id, Material.rock);
-               this.setCreativeTab(ChemiCraft.instance.creativeTab);
+               this.setCreativeTab(ChemiCraft.instance.creativeTabAtomsOre);
        }
 
        @Override
index 6ddc4fa..5c5416b 100644 (file)
@@ -1,10 +1,9 @@
 package pcc.chemicraft.ore;
 
-import pcc.chemicraft.ChemiCraft;
-import net.minecraft.block.Block;
 import net.minecraft.item.ItemBlock;
 import net.minecraft.item.ItemDye;
 import net.minecraft.item.ItemStack;
+import pcc.chemicraft.ChemiCraft;
 import cpw.mods.fml.relauncher.Side;
 import cpw.mods.fml.relauncher.SideOnly;
 
index 5160d53..8046696 100644 (file)
Binary files a/resources/pcc/chemicraft/blocks/AtomsOre.png and b/resources/pcc/chemicraft/blocks/AtomsOre.png differ