OSDN Git Service

Merge branch 'master' of git.sourceforge.jp:/gitroot/chemicraft/chemicraft
[chemicraft/chemicraft.git] / common / pcc / chemicraft / ChemiCraft.java
index 0b99d76..5b8ec99 100644 (file)
@@ -17,6 +17,7 @@ import pcc.chemicraft.compounds.CompoundWater;
 import pcc.chemicraft.debug.CommandDeleteItem;
 import pcc.chemicraft.debug.CommandGenDebugRoom;
 import pcc.chemicraft.debug.CommandSetTile;
 import pcc.chemicraft.debug.CommandDeleteItem;
 import pcc.chemicraft.debug.CommandGenDebugRoom;
 import pcc.chemicraft.debug.CommandSetTile;
+import pcc.chemicraft.gen.WorldGenAtomsOre;
 import pcc.chemicraft.item.ItemAtoms;
 import pcc.chemicraft.item.ItemAtomsGrenade;
 import pcc.chemicraft.item.ItemCompounds;
 import pcc.chemicraft.item.ItemAtoms;
 import pcc.chemicraft.item.ItemAtomsGrenade;
 import pcc.chemicraft.item.ItemCompounds;
@@ -341,31 +342,32 @@ public class ChemiCraft {
                });
 
                //鉱石を追加します
                });
 
                //鉱石を追加します
-               api.addAtomsOre("Petalite", this.atomsOreID[0], 0, 5, 5, 20); //ペタル石を追加
-               api.addAtomsOreLanguage("Petalite", "ペタル石", "ja_JP");
+               this.api.addAtomsOre("Petalite", this.atomsOreID[0], 0, 5, 5, 20); //ペタル石を追加
+               this.api.addAtomsOreLanguage("Petalite", "ペタル石", "ja_JP");
 
                //化合物を追加します
 
                //化合物を追加します
-               api.addLangCompound("ja_JP", "ChlorousAcid", "亜塩素酸");
-
-               api.addLangCompound("ja_JP", "SodiumChloride", "塩化ナトリウム");
-               api.addLangCompound("ja_JP", "SodiumBicarbonate", "重曹");
-
-               api.addLangCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");
-               api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");
-               api.addLangCompound("ja_JP", "Water", "水");
+               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", "水");
 
 
                //化合物のHandlerを設定します
 
 
                //化合物のHandlerを設定します
-               api.settingCompoundHandler("Water", new CompoundWater());
+               this.api.settingCompoundHandler("Water", new CompoundWater());
 
                //化合物のレシピを追加します
 
                //化合物のレシピを追加します
-               api.addChemicalCombinationRecipe(new String[]{"Na", "O", "H"}, new Integer[]{1, 1, 1}, new ItemStack(this.itemCompounds, 1, api.getCompound("SodiumChloride")));
-               api.addChemicalCombinationRecipe(new String[]{"H", "O", "Cl"}, new Integer[]{1, 2, 1}, new ItemStack(this.itemCompounds, 1, 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", "Cl"}, new Integer[]{1, 2, 1}, new ItemStack(this.itemCompounds, 1, this.api.getCompound("ChlorousAcid")));
+               this.api.addChemicalCombinationRecipe(new String[]{"Na", "O", "H"}, new Integer[]{1, 1, 1}, new ItemStack(this.itemCompounds, 1, api.getCompound("SodiumChloride")));
+               this.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"}, 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,
                                null,
                                new ItemStack(Block.stone),
                                null,
@@ -380,22 +382,22 @@ public class ChemiCraft {
                new NBTRecipeGrenade()
                                );
 
                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});
 
                                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});
 
                                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用の処理
        }
 
        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 < blockAtomsOre.length; i++)
                }
 
                for (int i = 0; i < blockAtomsOre.length; i++)
@@ -408,10 +410,16 @@ public class ChemiCraft {
                                }
                        }
                }
                                }
                        }
                }
+
+               /* 動作がおかしかったため一時的にコメントアウト */
+               /*
                //鉱石の生成
                //鉱石の生成
-               for (int i = 0; i < api.getAtomsOreIDList().size(); i++) {
+               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)));
                        GameRegistry.registerWorldGenerator(api.getAtomsOres().get(i));
                }
                        GameRegistry.registerWorldGenerator(api.getAtomsOres().get(i));
                }
+                */
+
        }
 
        private void debug(final FMLPostInitializationEvent event) {
        }
 
        private void debug(final FMLPostInitializationEvent event) {
@@ -423,10 +431,11 @@ public class ChemiCraft {
                /*
                 * TWDebug
                 */
                /*
                 * TWDebug
                 */
-               api.addToolAndWeaponRecipe(new ItemStack[] {
+               this.api.addToolAndWeaponRecipe(new ItemStack[] {
                                new ItemStack(Block.stone, 1, 1)
                },
                new ItemStack(Block.dirt, 1, 0));
                                new ItemStack(Block.stone, 1, 1)
                },
                new ItemStack(Block.dirt, 1, 0));
+
        }
 
 }
        }
 
 }