OSDN Git Service

修正・変更
authorponkotate <ponkotate@users.sourceforge.jp>
Sun, 10 Mar 2013 01:00:14 +0000 (10:00 +0900)
committerponkotate <ponkotate@users.sourceforge.jp>
Sun, 10 Mar 2013 01:00:14 +0000 (10:00 +0900)
鉱石分解レシピ処理を修正。
鉱石追加。

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

index 3140c28..bb32218 100644 (file)
@@ -401,7 +401,7 @@ public class ChemiCraft implements Runnable {
                api.addChemicalCell(itemChemicalCells, "ChemicalCell", 1000);
                api.addChemicalCellLanguage("ChemicalCell", "ja_JP", "化学電池");
 
-               //元素入手手段
+               // 元素入手手段
 
                // 水素
                // 水を分解。
@@ -410,59 +410,201 @@ public class ChemiCraft implements Runnable {
                // 未定。
 
                // リチウム
-               api.addAtomOres("LithiumOre", new String[]{"Li", "Al", "Si", "O"}, new Integer[]{1, 1, 4, 10}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // LiAlSi4O10
+               api.addAtomOres(
+                               "LithiumOre",
+                               new String[] { "Li", "Al", "Si", "O" },
+                               new Integer[] { 1, 1, 4, 10 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // LiAlSi4O10
                api.addAtomOresLanguage("LithiumOre", "リチウム鉱石", "ja_JP");
 
                // ベリリウム
-               api.addAtomOres("BerylliumOre", new String[]{"Be", "Al", "Si", "O"}, new Integer[]{3, 2, 6, 18}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // Be3Al2Si6O18
+               api.addAtomOres(
+                               "BerylliumOre",
+                               new String[] { "Be", "Al", "Si", "O" },
+                               new Integer[] { 3, 2, 6, 18 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // Be3Al2Si6O18
                api.addAtomOresLanguage("BerylliumOre", "ベリリウム鉱石", "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);   // NaCaB5O6(OH)6・5H2O
+               api.addAtomOres(
+                               "BoronOre",
+                               new String[] { "Na", "Ca", "B", "O", "H" },
+                               new Integer[] { 1, 1, 5, 17, 16 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // NaCaB5O6(OH)6・5H2O
                api.addAtomOresLanguage("BoronOre", "ホウ素鉱石", "ja_JP");
 
                // 炭素
-               api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal), new Integer[]{chemicalData.CARBON}, new Integer[]{1});
+               api.addPyrolysisDecompositionRecipe(
+                               new ItemStack(Block.oreCoal),
+                               new Integer[] { chemicalData.CARBON },
+                               new Integer[] { 1 });
 
                // フッ素
-               api.addAtomOres("FluorineOre", new String[]{"Ca", "F"}, new Integer[]{1, 2}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // CaF2
+               api.addAtomOres(
+                               "FluorineOre",
+                               new String[] { "Ca", "F" },
+                               new Integer[] { 1, 2 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // CaF2
                api.addAtomOresLanguage("FluorineOre", "フッ素鉱石", "ja_JP");
 
                // ナトリウム
-               api.addAtomOres("SodiumOre", new String[]{"Na", "Cl"}, new Integer[]{1, 1}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // NaCl
+               api.addAtomOres(
+                               "SodiumOre",
+                               new String[] { "Na", "Cl" },
+                               new Integer[] { 1, 1 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // NaCl
                api.addAtomOresLanguage("SodiumOre", "ナトリウム鉱石", "ja_JP");
 
                // マグネシウム
-               api.addAtomOres("MagnesiumOre", new String[]{"Ca", "Mg", "C", "O"}, new Integer[]{1, 1, 2, 6}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // CaMg(CO3)2
+               api.addAtomOres(
+                               "MagnesiumOre",
+                               new String[] { "Ca", "Mg", "C", "O" },
+                               new Integer[] { 1, 1, 2, 6 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // CaMg(CO3)2
                api.addAtomOresLanguage("MagnesiumOre", "マグネシウム鉱石", "ja_JP");
 
                // アルミニウム
-               api.addAtomOres("AluminiumOre", new String[]{"Al", "O", "H"}, new Integer[]{3, 3, 3}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // Al(OH)3
+               api.addAtomOres(
+                               "AluminiumOre",
+                               new String[] { "Al", "O", "H" },
+                               new Integer[] { 3, 3, 3 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // Al(OH)3
                api.addAtomOresLanguage("AluminiumOre", "アルミニウム鉱石", "ja_JP");
 
                // ケイ素
                // 1.5まで保留。
 
                // リン
-               api.addAtomOres("PhosphorusOre", new String[]{"Ca", "P", "O", "F"}, new Integer[]{5, 3, 12, 1}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // Ca5(PO4)3F
+               api.addAtomOres(
+                               "PhosphorusOre",
+                               new String[] { "Ca", "P", "O", "F" },
+                               new Integer[] { 5, 3, 12, 1 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // Ca5(PO4)3F
                api.addAtomOresLanguage("PhosphorusOre", "リン鉱石", "ja_JP");
 
                // 硫黄
-               api.addAtomOres("SulfurOre", new String[]{"S"}, new Integer[]{1}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // S
+               api.addAtomOres(
+                               "SulfurOre",
+                               new String[] { "S" },
+                               new Integer[] { 1 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // S
                api.addAtomOresLanguage("SulfurOre", "硫黄鉱石", "ja_JP");
 
                // カリウム
-               api.addAtomOres("PotassiumOre", new String[]{"K", "Cl"}, new Integer[]{1, 1}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // KCl
+               api.addAtomOres(
+                               "PotassiumOre",
+                               new String[] { "K", "Cl" },
+                               new Integer[] { 1, 1 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // KCl
                api.addAtomOresLanguage("PotassiumOre", "カリウム鉱石", "ja_JP");
 
                // カルシウム
-               api.addAtomOres("CalciumOre", new String[]{"Ca", "C", "O"}, new Integer[]{1, 1, 3}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // CaCO3
+               api.addAtomOres(
+                               "CalciumOre",
+                               new String[] { "Ca", "C", "O" },
+                               new Integer[] { 1, 1, 3 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // CaCO3
                api.addAtomOresLanguage("CalciumOre", "カルシウム鉱石", "ja_JP");
 
                // スカンジウム
-               api.addAtomOres("ScandiumOre", new String[]{"Sc", "Y", "Si", "O"}, new Integer[]{2, 2, 2, 7}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // (Sc,Y)2Si2O7
+               api.addAtomOres(
+                               "ScandiumOre",
+                               new String[] { "Sc", "Y", "Si", "O" },
+                               new Integer[] { 2, 2, 2, 7 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // (Sc,Y)2Si2O7
                api.addAtomOresLanguage("ScandiumOre", "スカンジウム鉱石", "ja_JP");
 
+               // チタン
+               api.addAtomOres(
+                               "TitaniumOre",
+                               new String[] { "Ti", "O" },
+                               new Integer[] { 1, 2 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // TiO2
+               api.addAtomOresLanguage("TitaniumOre", "チタン鉱石", "ja_JP");
+
+               // バナジウム
+               api.addAtomOres(
+                               "VanadiumOre",
+                               new String[] { "K", "U", "O", "V", "H" },
+                               new Integer[] { 2, 2, 15, 2, 6 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // K2(UO2)2V2O8・3H2O
+               api.addAtomOresLanguage("VanadiumOre", "バナジウム鉱石", "ja_JP");
+
+               // クロム
+               api.addAtomOres(
+                               "Chromium",
+                               new String[] { "Fe", "Cr", "O" },
+                               new Integer[] { 1, 2, 4 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               api.addAtomOresLanguage("Chromium", "クロム鉱石", "ja_JP");
+               // FeCr2O4
+
+               // マンガン
+               api.addAtomOres(
+                               "ManganeseOre",
+                               new String[] { "Mn", "O" },
+                               new Integer[] { 1, 2 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               api.addAtomOresLanguage("ManganeseOre", "ja_JP", "マンガン鉱石");
+               // MnO2
+
+               // コバルト
+               api.addAtomOres(
+                               "CobaltOre",
+                               new String[] { "Co", "As", "S" },
+                               new Integer[] { 1, 1, 1 },
+                               this.atomOresID[api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               api.addAtomOresLanguage("CobaltOre", "ja_JP", "コバルト鉱石");
+               // CoAsS
+
                // api.addAtomOres("元素名(英)", new String[]{"元素"}, new Integer[]{<数>}, this.atomOresID[api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // 化学式
                // api.addAtomOresLanguage("元素名(英)", "元素名(他国語)", "言語");
 
@@ -523,8 +665,8 @@ public class ChemiCraft implements Runnable {
 
                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(i),
-                                       api.getAtomOresAmounts().get(i));
+                                       api.getAtomOresAtoms().get(api.getAtomOresName().getKeyList(i)),
+                                       api.getAtomOresAmounts().get(api.getAtomOresName().getKeyList(i)));
                }
 
                //Entityを追加
index b1285d8..53ece56 100644 (file)
@@ -238,6 +238,29 @@ public class ChemiCraftAPI {
 
 
        /**
+        * 鉱石を追加します
+        * @param par1Name 鉱石名
+        * @param par2Atoms 元素
+        * @param par3Amounts 元素数
+        * @param par4Id ID
+        * @param par5Size 量
+        * @param par6Frequency 頻度
+        * @param par7PosY Y座標
+        */
+       public void addAtomOres(String par1Name, Integer[] par2Atoms, Integer[] par3Amounts, int par4Id, int par5Size, EnumOreSpawnFrequency par6Enum){
+               addAtomOres(
+                               par1Name,
+                               par2Atoms,
+                               par3Amounts,
+                               par4Id,
+                               par5Size,
+                               par6Enum.getFrequency(),
+                               par6Enum.getPosY());
+       }
+
+
+
+       /**
         * 既に登録した鉱石の新しい名前・言語を追加します
         * @param par1Name 英語名
         * @param par2NewName 新しい名前