OSDN Git Service

修正・変更
authorponkotate <ponkotate@users.sourceforge.jp>
Sat, 9 Mar 2013 01:35:37 +0000 (10:35 +0900)
committerponkotate <ponkotate@users.sourceforge.jp>
Sat, 9 Mar 2013 01:35:37 +0000 (10:35 +0900)
鉱石の仕様変更。

common/pcc/chemicraft/ChemiCraft.java
common/pcc/chemicraft/ChemiCraftAPI.java
common/pcc/chemicraft/tileentity/TileEntityElectrolysisTable.java

index dc1dadc..2c22393 100644 (file)
@@ -7,6 +7,7 @@ import net.minecraft.item.Item;
 import net.minecraft.item.ItemStack;
 import net.minecraft.src.ModLoader;
 import net.minecraftforge.common.Configuration;
 import net.minecraft.item.ItemStack;
 import net.minecraft.src.ModLoader;
 import net.minecraftforge.common.Configuration;
+import net.minecraftforge.common.MinecraftForge;
 import net.minecraftforge.common.Property;
 import net.minecraftforge.oredict.OreDictionary;
 import pcc.chemicraft.block.BlockChemicalCombinationTable;
 import net.minecraftforge.common.Property;
 import net.minecraftforge.oredict.OreDictionary;
 import pcc.chemicraft.block.BlockChemicalCombinationTable;
@@ -22,6 +23,7 @@ import pcc.chemicraft.debug.CommandDeleteItem;
 import pcc.chemicraft.debug.CommandGenDebugRoom;
 import pcc.chemicraft.debug.CommandSetTile;
 import pcc.chemicraft.entity.EntityDust;
 import pcc.chemicraft.debug.CommandGenDebugRoom;
 import pcc.chemicraft.debug.CommandSetTile;
 import pcc.chemicraft.entity.EntityDust;
+import pcc.chemicraft.gen.EnumOreSpawnFrequency;
 import pcc.chemicraft.item.ItemAtoms;
 import pcc.chemicraft.item.ItemAtomsGrenade;
 import pcc.chemicraft.item.ItemChemiCell;
 import pcc.chemicraft.item.ItemAtoms;
 import pcc.chemicraft.item.ItemAtomsGrenade;
 import pcc.chemicraft.item.ItemChemiCell;
@@ -311,6 +313,7 @@ public class ChemiCraft implements Runnable {
                                        setStepSound(Block.soundStoneFootstep).
                                        setBlockName("AtomsOre" + i);
                        GameRegistry.registerBlock(blockAtomOres[i], ItemAtomOres.class, "AtomsOre" + i);
                                        setStepSound(Block.soundStoneFootstep).
                                        setBlockName("AtomsOre" + i);
                        GameRegistry.registerBlock(blockAtomOres[i], ItemAtomOres.class, "AtomsOre" + i);
+                       MinecraftForge.setBlockHarvestLevel(this.blockAtomOres[i], "pickaxe", 2);
                }
 
                // Itemを追加します
                }
 
                // Itemを追加します
@@ -398,73 +401,69 @@ public class ChemiCraft implements Runnable {
                api.addChemicalCell(itemChemicalCells, "ChemicalCell", 1000);
                api.addChemicalCellLanguage("ChemicalCell", "ja_JP", "化学電池");
 
                api.addChemicalCell(itemChemicalCells, "ChemicalCell", 1000);
                api.addChemicalCellLanguage("ChemicalCell", "ja_JP", "化学電池");
 
-               //鉱石を追加します
+               //元素入手手段
+
+               // 水素
+               // 水を分解。
+
+               // ヘリウム
+               // 未定。
 
                // リチウム
 
                // リチウム
-               api.addAtomOres("Petalite", new String[]{"Li", "Al", "Si", "O"}, new Integer[]{1, 1, 4, 10}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // LiAlSi4O10
-               api.addAtomOresLanguage("Petalite", "ペタル石", "ja_JP");
-               api.addAtomOres("Spodumene", new String[]{"Li", "Al", "Si", "O"}, new Integer[]{1, 1, 2, 6}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // LiAlSi2O6
-               api.addAtomOresLanguage("Spodumene", "リチア輝石", "ja_JP");
+               api.addAtomOres("LithiumOre", new String[]{"Li", "Al", "Si", "O"}, new Integer[]{1, 1, 4, 10}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // LiAlSi4O10
+               api.addAtomOresLanguage("LithiumOre", "リチウム鉱石", "ja_JP");
 
                // ベリリウム
 
                // ベリリウム
-               api.addAtomOres("Beryl", new String[]{"Be", "Al", "Si", "O"}, new Integer[]{3, 2, 6, 18}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Be3Al2Si6O18
-               api.addAtomOresLanguage("Beryl", "緑柱石", "ja_JP");
-               api.addAtomOres("Chrysoberyl", new String[]{"Be", "Al", "O"}, new Integer[]{1, 2, 4}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // BeAl2O4
-               api.addAtomOresLanguage("Chrysoberyl", "金緑石", "ja_JP");
+               api.addAtomOres("BerylliumOre", new String[]{"Be", "Al", "Si", "O"}, new Integer[]{3, 2, 6, 18}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // Be3Al2Si6O18
+               api.addAtomOresLanguage("BerylliumOre", "ベリリウム鉱石", "ja_JP");
 
                // ホウ素
 
                // ホウ素
-               api.addAtomOres("Ulexite", new String[]{"Na", "Ca", "B", "O", "H"}, new Integer[]{1, 1, 5, 17, 16}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50);   // NaCaB5O6(OH)6・5H2O
-               api.addAtomOresLanguage("Ulexite", "ウレキサイト", "ja_JP");
+               api.addAtomOres("BoronOre", new String[]{"Na", "Ca", "B", "O", "H"}, new Integer[]{1, 1, 5, 17, 16}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50);   // NaCaB5O6(OH)6・5H2O
+               api.addAtomOresLanguage("BoronOre", "ホウ素鉱石", "ja_JP");
+
+               // 炭素
+               api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal), new Integer[]{chemicalData.CARBON}, new Integer[]{1});
 
                // フッ素
 
                // フッ素
-               api.addAtomOres("Fluorite", new String[]{"Ca", "F"}, new Integer[]{1, 2}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // CaF2
-               api.addAtomOresLanguage("Fluorite", "蛍石", "ja_JP");
-               api.addAtomOres("Cryolite", new String[]{"Na", "Al", "F"}, new Integer[]{3, 1, 6}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Na3AlF6
-               api.addAtomOresLanguage("Cryolite", "氷晶石", "ja_JP");
+               api.addAtomOres("FluorineOre", new String[]{"Ca", "F"}, new Integer[]{1, 2}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // CaF2
+               api.addAtomOresLanguage("FluorineOre", "フッ素鉱石", "ja_JP");
 
                // ナトリウム
 
                // ナトリウム
-               api.addAtomOres("RockSalt", new String[]{"Na", "Cl"}, new Integer[]{1, 1}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // NaCl
-               api.addAtomOresLanguage("RockSalt", "岩塩", "ja_JP");
+               api.addAtomOres("SodiumOre", new String[]{"Na", "Cl"}, new Integer[]{1, 1}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // NaCl
+               api.addAtomOresLanguage("SodiumOre", "ナトリウム鉱石", "ja_JP");
 
                // マグネシウム
 
                // マグネシウム
-               api.addAtomOres("Dolomite", new String[]{"Ca", "Mg", "C", "O"}, new Integer[]{1, 1, 2, 6}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // CaMg(CO3)2
-               api.addAtomOresLanguage("Dolomite", "苦灰石", "ja_JP");
-               api.addAtomOres("Magnesite", new String[]{"Mg", "C", "O"}, new Integer[]{1, 1, 3}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // MgCO3
-               api.addAtomOresLanguage("Magnesite", "菱苦土石", "ja_JP");
+               api.addAtomOres("MagnesiumOre", new String[]{"Ca", "Mg", "C", "O"}, new Integer[]{1, 1, 2, 6}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // CaMg(CO3)2
+               api.addAtomOresLanguage("MagnesiumOre", "マグネシウム鉱石", "ja_JP");
 
                // アルミニウム
 
                // アルミニウム
-               api.addAtomOres("Gibbsite", new String[]{"Al", "O", "H"}, new Integer[]{3, 3, 3}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Al(OH)3
-               api.addAtomOresLanguage("Gibbsite", "ギブス石", "ja_JP");
-               api.addAtomOres("Ruby", new String[]{"Al", "O"}, new Integer[]{2, 3}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Al2O3
-               api.addAtomOresLanguage("Ruby", "ルビー", "ja_JP");
-               api.addAtomOres("Sapphire", new String[]{"Al", "O"}, new Integer[]{2, 3}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Al2O3
-               api.addAtomOresLanguage("Sapphire", "サファイア", "ja_JP");
+               api.addAtomOres("AluminiumOre", new String[]{"Al", "O", "H"}, new Integer[]{3, 3, 3}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // Al(OH)3
+               api.addAtomOresLanguage("AluminiumOre", "アルミニウム鉱石", "ja_JP");
 
                // ケイ素
 
                // ケイ素
-               api.addAtomOres("Quartz", new String[]{"Si", "O"}, new Integer[]{1, 2}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // SiO2
-               api.addAtomOresLanguage("Quartz", "石英", "ja_JP");
+               // 1.5まで保留。
 
                // リン
 
                // リン
-               api.addAtomOres("Fluorapatite", new String[]{"Ca", "P", "O", "F"}, new Integer[]{5, 3, 12, 1}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Ca5(PO4)3F
-               api.addAtomOresLanguage("Fluorapatite", "フッ素リン灰石", "ja_JP");
-               api.addAtomOres("Chlorapatite", new String[]{"Ca", "P", "O", "Cl"}, new Integer[]{5, 3, 12, 1}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Ca5(PO4)3Cl
-               api.addAtomOresLanguage("Chlorapatite", "塩素燐灰石", "ja_JP");
-               api.addAtomOres("Hydroxylapatite", new String[]{"Ca", "P", "O", "H"}, new Integer[]{5, 3, 13, 1}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Ca5(PO4)3(OH)
-               api.addAtomOresLanguage("Hydroxylapatite", "水酸燐灰石", "ja_JP");
+               api.addAtomOres("PhosphorusOre", new String[]{"Ca", "P", "O", "F"}, new Integer[]{5, 3, 12, 1}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // Ca5(PO4)3F
+               api.addAtomOresLanguage("PhosphorusOre", "リン鉱石", "ja_JP");
+
+               // 硫黄
+               api.addAtomOres("SulfurOre", new String[]{"S"}, new Integer[]{1}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // S
+               api.addAtomOresLanguage("SulfurOre", "硫黄鉱石", "ja_JP");
 
                // カリウム
 
                // カリウム
-               api.addAtomOres("Sylvite", new String[]{"K", "Cl"}, new Integer[]{1, 1}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // KCl
-               api.addAtomOresLanguage("Sylvite", "カリ岩塩", "ja_JP");
+               api.addAtomOres("PotassiumOre", new String[]{"K", "Cl"}, new Integer[]{1, 1}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // KCl
+               api.addAtomOresLanguage("PotassiumOre", "カリウム鉱石", "ja_JP");
 
                // カルシウム
 
                // カルシウム
-               api.addAtomOres("Calcite", new String[]{"Ca", "C", "O"}, new Integer[]{1, 1, 3}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // CaCO3
-               api.addAtomOresLanguage("Calcite", "方解石", "ja_JP");
+               api.addAtomOres("CalciumOre", new String[]{"Ca", "C", "O"}, new Integer[]{1, 1, 3}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // CaCO3
+               api.addAtomOresLanguage("CalciumOre", "カルシウム鉱石", "ja_JP");
 
                // スカンジウム
 
                // スカンジウム
-               api.addAtomOres("Thortveitite", new String[]{"Sc", "Y", "Si", "O"}, new Integer[]{2, 2, 2, 7}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // (Sc,Y)2Si2O7
-               api.addAtomOresLanguage("Thortveitite", "トルトベイト石", "ja_JP");
+               api.addAtomOres("ScandiumOre", new String[]{"Sc", "Y", "Si", "O"}, new Integer[]{2, 2, 2, 7}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // (Sc,Y)2Si2O7
+               api.addAtomOresLanguage("ScandiumOre", "スカンジウム鉱石", "ja_JP");
 
 
-               // api.addAtomOres("元素名(英)", new String[]{"元素"}, new Integer[]{<数>}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // 化学式
+               // api.addAtomOres("元素名(英)", new String[]{"元素"}, new Integer[]{<数>}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL, 50); // 化学式
                // api.addAtomOresLanguage("元素名(英)", "元素名(他国語)", "言語");
 
                //化合物を追加します
                // api.addAtomOresLanguage("元素名(英)", "元素名(他国語)", "言語");
 
                //化合物を追加します
@@ -488,9 +487,9 @@ public class ChemiCraft implements Runnable {
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
-                               new ItemStack(this.itemAtoms, 1, ChemiCraftData.ZINC),
+                               new ItemStack(this.itemAtoms, 1, chemicalData.ZINC),
                                null,
                                null,
-                               new ItemStack(this.itemAtoms, 1, ChemiCraftData.COPPER),
+                               new ItemStack(this.itemAtoms, 1, chemicalData.COPPER),
                                new ItemStack(Item.bucketWater),
                                new ItemStack(Item.bucketWater),
                                new ItemStack(Item.bucketWater),
                                new ItemStack(Item.bucketWater),
                                new ItemStack(Item.bucketWater),
                                new ItemStack(Item.bucketWater),
@@ -515,17 +514,17 @@ public class ChemiCraft implements Runnable {
                                );
 
                this.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0),
                                );
 
                this.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0),
-                               new Integer[] {ChemiCraftData.HYDROGEN, ChemiCraftData.OXYGEN},
+                               new Integer[] {ChemiCraftData.HYDROGEN, chemicalData.OXYGEN},
                                new Integer[] {2, 1});
 
                this.api.addPyrolysisDecompositionRecipe(new ItemStack(this.itemCompounds, 1, this.api.getCompound("Water")),
                                new Integer[] {2, 1});
 
                this.api.addPyrolysisDecompositionRecipe(new ItemStack(this.itemCompounds, 1, this.api.getCompound("Water")),
-                               new Integer[] {ChemiCraftData.HYDROGEN, ChemiCraftData.OXYGEN},
+                               new Integer[] {ChemiCraftData.HYDROGEN, chemicalData.OXYGEN},
                                new Integer[] {2, 1});
 
                for (int i = 0; i < api.getAtomOresName().sizeKeysList(); i++){
                        this.api.addPyrolysisDecompositionRecipe(new ItemStack(this.blockAtomOres[i / 16], 1, i - i / 16 * 16),
                                new Integer[] {2, 1});
 
                for (int i = 0; i < api.getAtomOresName().sizeKeysList(); i++){
                        this.api.addPyrolysisDecompositionRecipe(new ItemStack(this.blockAtomOres[i / 16], 1, i - i / 16 * 16),
-                                       api.getAtomOresAtoms().get(api.getAtomOresName().getKeyList(i)),
-                                       api.getAtomOresAmounts().get(api.getAtomOresName().getKeyList(i)));
+                                       api.getAtomOresAtoms().get(i),
+                                       api.getAtomOresAmounts().get(i));
                }
 
                //Entityを追加
                }
 
                //Entityを追加
index bdddd39..6046d9f 100644 (file)
@@ -5,6 +5,7 @@ import java.util.HashMap;
 
 import net.minecraft.item.Item;
 import net.minecraft.item.ItemStack;
 
 import net.minecraft.item.Item;
 import net.minecraft.item.ItemStack;
+import pcc.chemicraft.gen.EnumOreSpawnFrequency;
 import pcc.chemicraft.gen.WorldGenAtomsOre;
 import pcc.chemicraft.system.ChemiCraftCraftingManager;
 import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
 import pcc.chemicraft.gen.WorldGenAtomsOre;
 import pcc.chemicraft.system.ChemiCraftCraftingManager;
 import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
@@ -37,13 +38,13 @@ public class ChemiCraftAPI {
        /**
         * 鉱石別元素数リスト
         */
        /**
         * 鉱石別元素数リスト
         */
-       private HashMap<String, Integer[]> atomOresAmountsHash = new HashMap<String, Integer[]>();
+       private ArrayList<Integer[]> atomOresAmountsList = new ArrayList<Integer[]>();
 
 
        /**
         * 鉱石別元素リスト
         */
 
 
        /**
         * 鉱石別元素リスト
         */
-       private HashMap<String, Integer[]> atomOresAtomsHash = new HashMap<String, Integer[]>();
+       private ArrayList<Integer[]> atomOresAtomsList = new ArrayList<Integer[]>();
 
 
        /**
 
 
        /**
@@ -66,15 +67,15 @@ public class ChemiCraftAPI {
 
 
        /**
 
 
        /**
-        * 電池
+        * 電池言語リスト
         */
         */
-       private HashMap<ItemStack, Integer> chemicalCellsList = new HashMap<ItemStack, Integer>();
+       private ListHash<String, String> chemicalCellsLangListHash = new ListHash<String, String>();
 
 
        /**
 
 
        /**
-        * 電池言語リスト
+        * 電池
         */
         */
-       private ListHash<String, String> chemicalCellsLangListHash = new ListHash<String, String>();
+       private HashMap<ItemStack, Integer> chemicalCellsList = new HashMap<ItemStack, Integer>();
 
 
        /**
 
 
        /**
@@ -177,13 +178,25 @@ public class ChemiCraftAPI {
         */
        public void addAtomOres(String par1Name, Integer[] par2Atoms, Integer[] par3Amounts, int par4Id, int par5Size, int par6Frequency, int par7PosY){
                atomOresList.add(new WorldGenAtomsOre(par4Id, getAtomOresMetaOfLastIndex(), par5Size, par6Frequency, par7PosY));
         */
        public void addAtomOres(String par1Name, Integer[] par2Atoms, Integer[] par3Amounts, int par4Id, int par5Size, int par6Frequency, int par7PosY){
                atomOresList.add(new WorldGenAtomsOre(par4Id, getAtomOresMetaOfLastIndex(), par5Size, par6Frequency, par7PosY));
-               atomOresAtomsHash.put(par1Name, par2Atoms);
-               atomOresAmountsHash.put(par1Name, par3Amounts);
+               atomOresAtomsList.add(par2Atoms);
+               atomOresAmountsList.add(par3Amounts);
                addAtomOresLanguage(par1Name, par1Name, "en_US");
        }
 
 
 
                addAtomOresLanguage(par1Name, par1Name, "en_US");
        }
 
 
 
+       public void addAtomOres(String par1Name, Integer[] par2Atoms, Integer[] par3Amounts, int par4Id, int par5Size, EnumOreSpawnFrequency par6Frequency, int par7PosY){
+               addAtomOres(par1Name, par2Atoms, par3Amounts, par4Id, par5Size, par6Frequency.getFrequency(), par7PosY);
+       }
+
+
+
+       public void addAtomOres(String par1Name, String[] par2Atoms, Integer[] par3Amounts, int par4Id, int par5Size, EnumOreSpawnFrequency par6Frequency, int par7PosY){
+               addAtomOres(par1Name, ChemiCraftData.toAtoms(par2Atoms), par3Amounts, par4Id, par5Size, par6Frequency.getFrequency(), par7PosY);
+       }
+
+
+
        public void addAtomOres(String par1Name, String[] par2Atoms, Integer[] par3Amounts, int par4Id, int par5Size, int par6Frequency, int par7PosY){
                addAtomOres(par1Name, ChemiCraftData.toAtoms(par2Atoms), par3Amounts, par4Id, par5Size, par6Frequency, par7PosY);
        }
        public void addAtomOres(String par1Name, String[] par2Atoms, Integer[] par3Amounts, int par4Id, int par5Size, int par6Frequency, int par7PosY){
                addAtomOres(par1Name, ChemiCraftData.toAtoms(par2Atoms), par3Amounts, par4Id, par5Size, par6Frequency, par7PosY);
        }
@@ -213,6 +226,7 @@ public class ChemiCraftAPI {
        }
 
 
        }
 
 
+
        /**
         * 既に登録した電池の新しい名前・言語を追加します
         * @param par1Name 英語名
        /**
         * 既に登録した電池の新しい名前・言語を追加します
         * @param par1Name 英語名
@@ -271,6 +285,27 @@ public class ChemiCraftAPI {
 
 
 
 
 
 
+       public void addElectrolysisDecompositionRecipe(ItemStack material, Integer[] integers, Integer[] integers2) {
+               ItemStack[] itemstacks = new ItemStack[integers.length];
+               for (int i = 0; i < itemstacks.length; i++) {
+                       itemstacks[i] = new ItemStack(ChemiCraft.instance.itemAtoms,integers2[i], integers[i]);
+               }
+               TileEntityElectrolysisTable.addRecipe(material, itemstacks);
+       }
+
+
+       /**
+        * 素材作成台のレシピを追加します
+        * @param materials 素材
+        * @param result 結果
+        * @param nbtRecipe NBT(Nullの場合はなし)
+        */
+       public void addMaterialRecipe(ItemStack[] materials, ItemStack result, ChemicalNBTRecipe nbtRecipe){
+               materialRecipe.add(new MaterialRecipe(result, materials, nbtRecipe, false));
+       }
+
+
+
        /**
         * 分解台の燃料を追加します
         * @param itemstack 燃料のItemStack
        /**
         * 分解台の燃料を追加します
         * @param itemstack 燃料のItemStack
@@ -281,6 +316,7 @@ public class ChemiCraftAPI {
        }
 
 
        }
 
 
+
        /**
         * 分解台のレシピを追加します
         * @param material 素材
        /**
         * 分解台のレシピを追加します
         * @param material 素材
@@ -297,28 +333,6 @@ public class ChemiCraftAPI {
 
 
 
 
 
 
-       public void addElectrolysisDecompositionRecipe(ItemStack material, Integer[] integers, Integer[] integers2) {
-               ItemStack[] itemstacks = new ItemStack[integers.length];
-               for (int i = 0; i < itemstacks.length; i++) {
-                       itemstacks[i] = new ItemStack(ChemiCraft.instance.itemAtoms,integers2[i], integers[i]);
-               }
-               TileEntityElectrolysisTable.addRecipe(material, itemstacks);
-       }
-
-
-
-       /**
-        * 素材作成台のレシピを追加します
-        * @param materials 素材
-        * @param result 結果
-        * @param nbtRecipe NBT(Nullの場合はなし)
-        */
-       public void addMaterialRecipe(ItemStack[] materials, ItemStack result, ChemicalNBTRecipe nbtRecipe){
-               materialRecipe.add(new MaterialRecipe(result, materials, nbtRecipe, false));
-       }
-
-
-
        /**
         * 素材作成台の不定形レシピを追加します
         * @param materials 素材
        /**
         * 素材作成台の不定形レシピを追加します
         * @param materials 素材
@@ -362,14 +376,14 @@ public class ChemiCraftAPI {
        
        //以下システム関連//////////////////////////////////////////////////////
 
        
        //以下システム関連//////////////////////////////////////////////////////
 
-       public HashMap<String, Integer[]> getAtomOresAmounts(){
-               return atomOresAmountsHash;
+       public ArrayList<Integer[]> getAtomOresAmounts(){
+               return atomOresAmountsList;
        }
 
 
 
        }
 
 
 
-       public HashMap<String, Integer[]> getAtomOresAtoms(){
-               return atomOresAtomsHash;
+       public ArrayList<Integer[]> getAtomOresAtoms(){
+               return atomOresAtomsList;
        }
 
 
        }
 
 
@@ -398,14 +412,14 @@ public class ChemiCraftAPI {
 
 
 
 
 
 
-       public HashMap<ItemStack, Integer> getChemicalCellsList(){
-               return chemicalCellsList;
+       public ListHash<String, String> getChemicalCellsLanguage(){
+               return chemicalCellsLangListHash;
        }
 
 
 
        }
 
 
 
-       public ListHash<String, String> getChemicalCellsLanguage(){
-               return chemicalCellsLangListHash;
+       public HashMap<ItemStack, Integer> getChemicalCellsList(){
+               return chemicalCellsList;
        }
 
 
        }
 
 
index a8850af..49e3dc8 100644 (file)
@@ -1,5 +1,8 @@
 package pcc.chemicraft.tileentity;
 
 package pcc.chemicraft.tileentity;
 
+import ic2.api.Direction;
+import ic2.api.energy.tile.IEnergySink;
+
 import java.io.DataOutputStream;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.io.DataOutputStream;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -19,7 +22,7 @@ import pcc.chemicraft.system.PacketHandler;
 
 import com.google.common.io.ByteArrayDataInput;
 
 
 import com.google.common.io.ByteArrayDataInput;
 
-public class TileEntityElectrolysisTable extends TileEntity
+public class TileEntityElectrolysisTable extends TileEntity implements IEnergySink
 {
 
        private InventoryElectrolysisMaterial invm = new InventoryElectrolysisMaterial();
 {
 
        private InventoryElectrolysisMaterial invm = new InventoryElectrolysisMaterial();
@@ -446,4 +449,34 @@ public class TileEntityElectrolysisTable extends TileEntity
                recipeList.put(material, result);
        }
 
                recipeList.put(material, result);
        }
 
+       @Override
+       public boolean acceptsEnergyFrom(TileEntity emitter, Direction direction)
+       {
+               return true;
+       }
+
+       @Override
+       public boolean isAddedToEnergyNet()
+       {
+               return true;
+       }
+
+       @Override
+       public int demandsEnergy()
+       {
+               return 0;
+       }
+
+       @Override
+       public int injectEnergy(Direction directionFrom, int amount)
+       {
+               return 0;
+       }
+
+       @Override
+       public int getMaxSafeInput()
+       {
+               return 32;
+       }
+
 }
 }