OSDN Git Service

とりあえずコミット
[chemicraft/chemicraft.git] / common / pcc / chemicraft / ChemiCraft.java
index c06acce..7614b10 100644 (file)
@@ -316,32 +316,24 @@ public class ChemiCraft {
                        Character.valueOf('A'), new ItemStack(this.itemAtoms, 1, 0),
                });
 
-               //鉱石を追加します
-               api.addAtomsOre(Block.blockDiamond.blockID, 0, 5, 20, 20); //テスト用。ダイヤモンドブロックを生成します
-
-               //鉱石の生成
-               for (int i = 0; i < api.getAtomsOreIDList().size(); i++) {
-                       GameRegistry.registerWorldGenerator(new WorldGenAtomsOre(api.getAtomsOreIDList().get(i), api.getAtomsOreMetaList().get(i), api.getAtomsOreSizeList().get(i), api.getAtomsOreFrequencyList().get(i), api.getAtomsOrePosYList().get(i)));
-               }
-
                //化合物を追加します
-               api.addLangCompound("ja_JP", "ChlorousAcid", "亜塩素酸");
+               this.api.addLangCompound("ja_JP", "ChlorousAcid", "亜塩素酸");
 
-               api.addLangCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");
-               api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");
-               api.addLangCompound("ja_JP", "Water", "水");
+               this.api.addLangCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");
+               this.api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");
+               this.api.addLangCompound("ja_JP", "Water", "水");
 
 
                //化合物のHandlerを設定します
-               api.settingCompoundHandler("Water", new CompoundWater());
+               this.api.settingCompoundHandler("Water", new CompoundWater());
 
                //化合物のレシピを追加します
-               api.addChemicalCombinationRecipe(new String[]{"H", "O", "Cl"}, new Integer[]{1, 2, 1}, new ItemStack(this.itemCompounds, 1, api.getCompound("ChlorousAcid")));
+               this.api.addChemicalCombinationRecipe(new String[]{"H", "O", "Cl"}, new Integer[]{1, 2, 1}, new ItemStack(this.itemCompounds, 1, this.api.getCompound("ChlorousAcid")));
 
-               api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.itemCompounds, 1, api.getCompound("Water")));
+               this.api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.itemCompounds, 1, this.api.getCompound("Water")));
 
                //手榴弾の追加
-               api.addMaterialRecipe(new ItemStack[] {
+               this.api.addMaterialRecipe(new ItemStack[] {
                                null,
                                new ItemStack(Block.stone),
                                null,
@@ -356,23 +348,29 @@ public class ChemiCraft {
                new NBTRecipeGrenade()
                                );
 
-               api.addDecompositionRecipe(new ItemStack(Item.potion, 1, 0),
+               this.api.addDecompositionRecipe(new ItemStack(Item.potion, 1, 0),
                                new int[] {ChemiCraftData.HYDROGEN, ChemiCraftData.OXYGEN},
                                new int[] {2, 1});
 
-               api.addDecompositionRecipe(new ItemStack(this.itemCompounds, 1, api.getCompound("Water")),
+               this.api.addDecompositionRecipe(new ItemStack(this.itemCompounds, 1, this.api.getCompound("Water")),
                                new int[] {ChemiCraftData.HYDROGEN, ChemiCraftData.OXYGEN},
                                new int[] {2, 1});
 
-               api.addDecompositionFuel(new ItemStack(Item.coal), 2000*8);
+               this.api.addDecompositionFuel(new ItemStack(Item.coal), 2000*8);
        }
 
        private void apiProcessing(final FMLPostInitializationEvent event) {
                // API用の処理
-               this.nameAuxiliary.addName(itemCompounds, api.getCompoundsName().toArray());
-               for (int i = 0; i < api.getCompoundsLang().size(); i++) {
-                       this.nameAuxiliary.addName(itemCompounds, api.getCompoundsLang().get(i), api.getCompoundsLangName().toArray());
+               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 < 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)));
+               }
+
        }
 
        private void debug(final FMLPostInitializationEvent event) {
@@ -384,10 +382,13 @@ public class ChemiCraft {
                /*
                 * TWDebug
                 */
-               api.addToolAndWeaponRecipe(new ItemStack[] {
+               this.api.addToolAndWeaponRecipe(new ItemStack[] {
                                new ItemStack(Block.stone, 1, 1)
                },
                new ItemStack(Block.dirt, 1, 0));
+
+               //鉱石を追加します
+               this.api.addAtomsOre(Block.blockDiamond.blockID, 0, 5, 5, 20);
        }
 
 }