OSDN Git Service

大規模なソース仕様変更
authormozipi <mozipi@users.sourceforge.jp>
Wed, 20 Mar 2013 04:18:56 +0000 (13:18 +0900)
committermozipi <mozipi@users.sourceforge.jp>
Wed, 20 Mar 2013 04:18:56 +0000 (13:18 +0900)
common/pcc/chemicraft/ChemiCraft.java
common/pcc/chemicraft/ChemiCraftConfiguration.java [new file with mode: 0644]
common/pcc/chemicraft/ChemiCraftRegister.java [new file with mode: 0644]
common/pcc/chemicraft/ChemiCraftRegisterBlock.java [new file with mode: 0644]
common/pcc/chemicraft/ChemiCraftRegisterChemicalRecipe.java [new file with mode: 0644]
common/pcc/chemicraft/ChemiCraftRegisterCompounds.java [new file with mode: 0644]
common/pcc/chemicraft/ChemiCraftRegisterCompoundsHandler.java [new file with mode: 0644]
common/pcc/chemicraft/ChemiCraftRegisterEntitys.java [new file with mode: 0644]
common/pcc/chemicraft/ChemiCraftRegisterItem.java [new file with mode: 0644]
common/pcc/chemicraft/ChemiCraftRegisterRecipe.java [new file with mode: 0644]
common/pcc/chemicraft/ChemiCraftRegisterTileEntity.java [new file with mode: 0644]

index f89a5d3..ac73030 100644 (file)
@@ -46,6 +46,10 @@ import pcc.chemicraft.util.Auxiliary.ArrayAuxiliary;
 import pcc.chemicraft.util.Auxiliary.NameAuxiliary;
 import pcc.chemicraft.util.NBTRecipeGrenade;
 import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.Mod.PostInit;
+import cpw.mods.fml.common.Mod.PreInit;
+import cpw.mods.fml.common.Mod.ServerStarting;
 import cpw.mods.fml.common.SidedProxy;
 import cpw.mods.fml.common.event.FMLPostInitializationEvent;
 import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@@ -55,15 +59,18 @@ import cpw.mods.fml.common.network.NetworkRegistry;
 import cpw.mods.fml.common.registry.EntityRegistry;
 import cpw.mods.fml.common.registry.GameRegistry;
 import cpw.mods.fml.common.registry.LanguageRegistry;
+
 /**
  * ChemiCraft本体
  * @author P.C.C.
- *
  */
 @Mod(modid = "chemiCraft", name = "ChemiCraft", version = "beta")
 @NetworkMod(clientSideRequired = true, serverSideRequired = true, versionBounds = "1.4.6", channels = "chemicraft", packetHandler = PacketHandler.class)
 public class ChemiCraft implements Runnable {
 
+       /**
+        * 元素名配列
+        */
        public static final String[] ATOMSNAME = {
                "Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminium", "Silicon",
                "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium",
@@ -74,6 +81,9 @@ public class ChemiCraft implements Runnable {
                "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium",
                "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Ununtrium", "Ununquadium", "Ununpentium", "Ununhexium", "Ununseptium", "Ununoctium" };
 
+       /**
+        * 元素名日本語版配列
+        */
        public static final String[] ATOMSNAMEJP = {
                "水素", "ヘリウム", "リチウム", "ベリウム", "ホウ素", "炭素", "窒素", "酸素", "フッ素", "ネオン", "ナトリウム", "マグネシウム", "アルミニウム", "ケイ素", "リン", "硫黄", "塩素", "アルゴン", "カリウム", "カルシウム", "スカンジウム",
                "チタン", "バナジウム", "クロム", "マンガン", "鉄", "コバルト", "ニッケル", "銅", "亜鉛", "ガリウム", "ゲルマニウム", "ヒ素", "セレン", "臭素", "クリプトン", "ルビジウム", "ストロンチウム", "イットリウム", "ジルコニウム", "ニオブ", "モリブデン", "テクネチウム", "ルテニウム",
@@ -83,25 +93,25 @@ public class ChemiCraft implements Runnable {
                "ボーリウム", "ハッシウム", "マイトネリウム", "ダームスタチウム", "レントゲニウム", "コペルニシウム", "ウンウントリウム", "ウンウンクアジウム", "ウンウンペンチウム", "ウンウンヘキシウム", "ウンウンセプチウム", "ウンウンオクチウム" };
 
        /**
-        * このmodのインスタンス
+        * this is ChemiCraft instance.
         */
-       @Mod.Instance("chemiCraft")
+       @Instance("chemiCraft")
        public static ChemiCraft instance;
 
        /**
-        * ChemiCraftのProxy.
+        * proxy of ChemiCraft.
         */
        @SidedProxy(clientSide = "pcc.chemicraft.client.ClientProxy", serverSide = "pcc.chemicraft.system.CommonProxy")
        public static CommonProxy proxy;
 
        /**
-        * ChemiCraftのCreativeTab.
+        * CreativeTab of ChemiCraft.
         */
        public static final CreativeTabs creativeTabChemiCraft = new CreativeTabChemiCraft("ChemiCraft");
        public static final CreativeTabs creativeTabAtomsOre = new CreativeTabAtomOres("AtomsOre");
 
        /**
-        * ItemID.
+        * the ItemID.
         */
        public int atomsID;
        public int compoundsID;
@@ -113,7 +123,7 @@ public class ChemiCraft implements Runnable {
        public int radiationBalletID;
 
        /**
-        * BlockID.
+        * the BlockID.
         */
        public int pyrolysisTableID;
        public int electrolysisTableID;
@@ -124,7 +134,7 @@ public class ChemiCraft implements Runnable {
        public int[] atomOresID = new int[3];
 
        /**
-        * GUIID.
+        * the GUIID.
         */
        public int guiPyrolysisTableID;
        public int guiElectrolysisTableID;
@@ -133,7 +143,7 @@ public class ChemiCraft implements Runnable {
        public int guiChemicalCraftingTableID;
 
        /**
-        * Block型変数.
+        * Variables of Block type.
         */
        public Block blockPyrolysisTable;
        public Block blockElectrolysisTable;
@@ -144,7 +154,7 @@ public class ChemiCraft implements Runnable {
        public Block[] blockAtomOres = new Block[atomOresID.length];
 
        /**
-        * Item型変数.
+        * Variables of Block type.
         */
        public Item itemAtoms;
        public Item itemCompounds;
@@ -156,7 +166,7 @@ public class ChemiCraft implements Runnable {
        public Item itemRadiationBallet;
 
        /**
-        * このmodで使用するTextureのパス.
+        * this is Textures Path on ChemiCraft.
         */
        public final String ITEM_ATOMS_TEXTURE = "/pcc/chemicraft/items/Atoms.png";
        public final String ITEM_COMPOUNDS_TEXTURE = "/pcc/chemicraft/items/Compounds.png";
@@ -173,30 +183,95 @@ public class ChemiCraft implements Runnable {
        public final String ENTITY_PARTICLE_TEXRURE = "/pcc/chemicraft/entityParticles/dust.png";
 
        /**
-        * このmodに必要な補助クラスのインスタンス.
+        *These Instances required on ChemiCraft.
         */
        public Auxiliary auxiliary = new Auxiliary();
        public NameAuxiliary nameAuxiliary = new NameAuxiliary();
        public ArrayAuxiliary arrayAuxiliary = new ArrayAuxiliary();
 
-       private ChemiCraftAPI api = ChemiCraftAPI.instance();
-       private ChemiCraftData chemicalData = new ChemiCraftData();
+       public ChemiCraftAPI api = ChemiCraftAPI.instance();
+       public static final ChemiCraftData chemicalData = new ChemiCraftData();
 
        /**
-        * このMODのスレッド
+        * this is Thread on ChemiCraft.
         */
        private Thread thread;
 
        /**
-        * Eventのインスタンス(PostInit以降)
+        * the Event Instance.
         */
        private FMLPostInitializationEvent event;
 
-       @Mod.PreInit
+       /**
+        * the Register Instances.
+        */
+       public ChemiCraftRegisterBlock registerBlock;
+       public ChemiCraftRegisterItem registerItem;
+       public ChemiCraftRegisterTileEntity registerTileEntity;
+       public ChemiCraftRegisterRecipe registerRecipe;
+       public ChemiCraftRegisterChemicalRecipe registerChemicalRecipe;
+       public ChemiCraftRegisterCompounds registerCompounds;
+       public ChemiCraftRegisterCompoundsHandler registerCompoundsHandler;
+       public ChemiCraftRegisterEntitys registerEntitys;
+
+       public ChemiCraft() {
+               this.registerBlock = new ChemiCraftRegisterBlock(this);
+               this.registerItem = new ChemiCraftRegisterItem(this);
+               this.registerTileEntity = new ChemiCraftRegisterTileEntity(this);
+               this.registerRecipe = new ChemiCraftRegisterRecipe(this);
+               this.registerChemicalRecipe = new ChemiCraftRegisterChemicalRecipe(this);
+               this.registerCompounds = new ChemiCraftRegisterCompounds(this);
+               this.registerCompoundsHandler = new ChemiCraftRegisterCompoundsHandler(this);
+               this.registerEntitys = new ChemiCraftRegisterEntitys(this);
+       }
+
+       /**
+        * PreInit:
+        * Configをロードします。
+        * @param event アノテーション呼び出しにより呼び出す必要なし
+        */
+       @PreInit
        public void chemiPreLoadMethod(final FMLPreInitializationEvent event) {
                Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
                cfg.load();
 
+               Property baseBlockID = cfg.get("BlockID", "Base of Block ID", 2400);
+               Property baseItemID = cfg.get("ItemID", "Base of Item ID", 25000);
+
+               ChemiCraftConfiguration ccfgBlock = new ChemiCraftConfiguration(baseBlockID.getInt());
+               ChemiCraftConfiguration ccfgItem = new ChemiCraftConfiguration(baseBlockID.getInt());
+
+               this.pyrolysisTableID = ccfgBlock.additionID();
+               this.electrolysisTableID = ccfgBlock.additionID();
+               this.chemicalConbinationTableID = ccfgBlock.additionID();
+               this.toolAndWeaponCraftingTableID = ccfgBlock.additionID();
+               this.chemicalCraftingTableID = ccfgBlock.additionID();
+               for (int i = 0; i < atomOresID.length; i++) {
+                       this.atomOresID[i] = ccfgBlock.additionID();
+               }
+
+               this.atomsID = ccfgItem.additionID();
+               this.compoundsID = ccfgItem.additionID();
+               this.gasCollectingBottleID = ccfgItem.additionID();
+               this.atomGrenadeID = ccfgItem.additionID();
+               this.chemicalCellsID = ccfgItem.additionID();
+               this.dustID = ccfgItem.additionID();
+               this.radiationGunID = ccfgItem.additionID();
+               this.radiationBalletID = ccfgItem.additionID();
+
+               Property guiPyrolysisTableIDProp = cfg.get("GUI", "GUIPyrolysisID", 1000);
+               Property guiElectrolysisTableIDProp = cfg.get("GUI", "GUIElectrolysisTableIDProp", 1001);
+               Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1002);
+               Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1003);
+               Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1004);
+
+               this.guiPyrolysisTableID = guiPyrolysisTableIDProp.getInt();
+               this.guiElectrolysisTableID = guiElectrolysisTableIDProp.getInt();
+               this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();
+               this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();
+               this.guiChemicalCraftingTableID = guiChemicalCraftingTableIDProp.getInt();
+
+               /*
                Property pyrolysisTableIDProp = cfg.getBlock("PyrolysisTable", 2400);
                Property electrolysisTableIDProp = cfg.getBlock("ElectrolysisTable", 2401);
                Property chemicalCombinationTableIDProp = cfg.getBlock("ChemicalCombinationID", 2402);
@@ -247,31 +322,40 @@ public class ChemiCraft implements Runnable {
                this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();
                this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();
                this.guiChemicalCraftingTableID = guiChemicalCraftingTableIDProp.getInt();
+               */
 
                cfg.save();
        }
 
-       @Mod.ServerStarting
+
+
+       @ServerStarting
        public void serverStarting(final FMLServerStartingEvent event) {
                event.registerServerCommand(new CommandSetTile());
                event.registerServerCommand(new CommandDeleteItem());
                event.registerServerCommand(new CommandGenDebugRoom());
        }
 
-       @Mod.PostInit
+
+
+       @PostInit
        public void chemiPostLoadMethod(final FMLPostInitializationEvent event) {
                this.thread = new Thread(this);
                this.event = event;
                this.thread.start();
+
                try {
                        this.thread.join();
                } catch (InterruptedException e) {
                        e.printStackTrace();
                }
+
                proxy.registerRenderInformation();
                Thread.yield();
        }
 
+
+
        @Override
        public void run() {
                while (true) {
@@ -284,419 +368,31 @@ public class ChemiCraft implements Runnable {
                }
        }
 
-       private void settingProcessing(final FMLPostInitializationEvent event) {
 
-               // Blockを追加します
-               this.blockPyrolysisTable = new BlockPyrolysisTable(this.pyrolysisTableID, 0, Material.ground).
-                               setHardness(2.0F).
-                               setResistance(0.0F).
-                               setStepSound(Block.soundStoneFootstep).
-                               setBlockName("PyrolysisTable");
-               this.blockElectrolysisTable = new BlockElectrolysisTable(this.electrolysisTableID, 1, Material.ground).
-                               setHardness(2.0F).
-                               setResistance(0.0F).
-                               setStepSound(Block.soundStoneFootstep).
-                               setBlockName("ElectrolysisTable");
-               this.blockChemicalCombinationTable = new BlockChemicalCombinationTable(this.chemicalConbinationTableID, 2, Material.ground).
-                               setHardness(2.0F).
-                               setResistance(0.0F).
-                               setStepSound(Block.soundStoneFootstep).
-                               setBlockName("ChemicalCombinationTable");
-               this.blockToolAndWeaponCraftingTable = new BlockToolAndWeaponCraftingTable(this.toolAndWeaponCraftingTableID, 3, Material.ground).
-                               setHardness(2.0F).
-                               setResistance(0.0F).
-                               setStepSound(Block.soundStoneFootstep).
-                               setBlockName("ToolAndWeaponCraftingTable");
-               this.blockChemicalCraftingTable = new BlockChemicalCraftingTable(this.chemicalCraftingTableID, 4, Material.ground).
-                               setHardness(2.0F).
-                               setResistance(0.0F).
-                               setStepSound(Block.soundStoneFootstep).
-                               setBlockName("ChemicalCraftingTable");
-
-               for (int i = 0; i < blockAtomOres.length; i++)
-               {
-                       this.blockAtomOres[i] = new BlockAtomOres(this.atomOresID[i]).
-                                       setHardness(3.0F).
-                                       setResistance(0.0F).
-                                       setStepSound(Block.soundStoneFootstep).
-                                       setBlockName("AtomsOre" + i);
-                       GameRegistry.registerBlock(blockAtomOres[i], ItemAtomOres.class, "AtomsOre" + i);
-                       MinecraftForge.setBlockHarvestLevel(this.blockAtomOres[i], "pickaxe", 2);
-               }
 
-               // Itemを追加します
-               this.itemAtoms = new ItemAtoms(this.atomsID).setItemName("atoms");
-               this.itemCompounds = new ItemCompounds(this.compoundsID).setItemName("compounds");
-               this.itemGasCollectingBottle = new ItemGasCollectingBottle(this.gasCollectingBottleID).setItemName("gasCollectingBottle").setIconIndex(0);
-               this.itemAtomGrenade = new ItemAtomsGrenade(this.atomGrenadeID).setItemName("grenade").setIconIndex(1);
-               this.itemChemicalCells = new ItemChemiCell(this.chemicalCellsID).setItemName("chemiCell").setIconIndex(3);
-               this.itemDust = new ItemDust(15000).setItemName("dust").setIconIndex(12);
-               this.itemRadiationGun = new ItemRadiationGun(this.radiationGunID).setIconIndex(4).setItemName("RadiationGun");
-               this.itemRadiationBallet = new ItemRadiationBallet(this.radiationBalletID).setIconIndex(5).setItemName("RadiationBallet");
-
-
-               // BlockをMinecraftに登録します
-               GameRegistry.registerBlock(this.blockPyrolysisTable, "BlockPyrolysisTable");
-               GameRegistry.registerBlock(this.blockChemicalCombinationTable, "BlockChemicalCombinationTable");
-               GameRegistry.registerBlock(this.blockToolAndWeaponCraftingTable, "BlockToolAndWeaponCraftingTable");
-               GameRegistry.registerBlock(this.blockChemicalCraftingTable, "BlockMaterialCraftingTable");
-               GameRegistry.registerBlock(this.blockElectrolysisTable, "BlockElectrolysisTable");
-
-               // Blockの名前を設定します
-               this.nameAuxiliary.addName(this.blockPyrolysisTable, "PyrolysisTable");
-               this.nameAuxiliary.addName(this.blockPyrolysisTable, "ja_JP", "熱分解台");
-               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ChemicalCombinationTable");
-               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ja_JP", "化合台");
-               this.nameAuxiliary.addName(this.blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");
-               this.nameAuxiliary.addName(this.blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");
-               this.nameAuxiliary.addName(this.blockChemicalCraftingTable, "ChemicalCraftingTable");
-               this.nameAuxiliary.addName(this.blockChemicalCraftingTable, "ja_JP", "素材製作台");
-               this.nameAuxiliary.addName(this.blockElectrolysisTable, "ElectrolysisTable");
-               this.nameAuxiliary.addName(this.blockElectrolysisTable, "ja_JP", "電気分解台");
-
-               // Itemの名前を設定します
-               this.nameAuxiliary.addName(this.itemAtoms, ATOMSNAME);
-               this.nameAuxiliary.addName(this.itemAtoms, "ja_JP", ATOMSNAMEJP);
-               this.nameAuxiliary.addName(this.itemGasCollectingBottle, "GasCollectingBottle");
-               this.nameAuxiliary.addName(this.itemGasCollectingBottle, "ja_JP", "集気瓶");
-               this.nameAuxiliary.addName(this.itemAtomGrenade, "AtomGrenade");
-               this.nameAuxiliary.addName(this.itemAtomGrenade, "ja_JP", "元素手榴弾");
-               this.nameAuxiliary.addName(this.itemDust, "dust");
-               this.nameAuxiliary.addName(this.itemDust, "ja_JP", "粉塵");
-               this.nameAuxiliary.addName(this.itemRadiationGun, "RadiationGun");
-               this.nameAuxiliary.addName(this.itemRadiationGun, "ja_JP", "放射線銃");
-               this.nameAuxiliary.addName(this.itemRadiationBallet, "RadiationBallet");
-               this.nameAuxiliary.addName(this.itemRadiationGun, "ja_JP", "放射線弾");
-
-               // TileEntityを追加します
-               GameRegistry.registerTileEntity(TileEntityPyrolysisTable.class, "TileEntityPyrolysisTable");
-               GameRegistry.registerTileEntity(TileEntityChemicalCombinationTable.class, "TileEntityChemicalCombinationTable");
-               GameRegistry.registerTileEntity(TileEntityToolAndWeaponCraftingTable.class, "TileEntityToolAndWeaponCraftingTable");
-               GameRegistry.registerTileEntity(TileEntityChemicalCraftingTable.class, "TileEntityChemicalCraftingTable");
-               GameRegistry.registerTileEntity(TileEntityElectrolysisTable.class, "TileEntityElectrolysisTable");
+       private void settingProcessing(final FMLPostInitializationEvent event) {
+
+               this.registerBlock.start();
+               this.registerItem.start();
+               this.registerTileEntity.start();
+               this.registerRecipe.start();
+               this.registerChemicalRecipe.start();
+               this.registerCompounds.start();
+               this.registerCompoundsHandler.start();
+               this.registerEntitys.start();
 
                // GUIを追加します
                NetworkRegistry.instance().registerGuiHandler(instance, proxy);
 
-               //化学作業台類のレシピを追加します
-               GameRegistry.addRecipe(new ItemStack(this.blockPyrolysisTable),
-                               new Object[]{
-                       "XYX", "ZAZ", "ZZZ",
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),
-                       Character.valueOf('Z'), new ItemStack(Block.stone),
-                       Character.valueOf('A'), new ItemStack(Item.bucketLava),
-               });
-               GameRegistry.addRecipe(new ItemStack(this.blockChemicalCombinationTable),
-                               new Object[]{
-                       "XYX", "ZAZ", "ZZZ",
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),
-                       Character.valueOf('Z'), new ItemStack(Block.stone),
-                       Character.valueOf('A'), new ItemStack(Block.obsidian),
-               });
-               GameRegistry.addRecipe(new ItemStack(this.blockToolAndWeaponCraftingTable),
-                               new Object[]{
-                       "XYX", "ZAZ", "ZZZ",
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),
-                       Character.valueOf('Z'), new ItemStack(Block.stone),
-                       Character.valueOf('A'), new ItemStack(Item.pickaxeSteel),
-               });
-               GameRegistry.addRecipe(new ItemStack(this.blockChemicalCraftingTable),
-                               new Object[]{
-                       "XYX", "ZAZ", "ZZZ",
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),
-                       Character.valueOf('Z'), new ItemStack(Block.stone),
-                       Character.valueOf('A'), new ItemStack(this.itemAtoms, 1, 0),
-               });
-
                //電池を追加します
-               api.addChemicalCell(itemChemicalCells, "ChemicalCell", 1000);
-               api.addChemicalCellLanguage("ChemicalCell", "ja_JP", "化学電池");
-
-               // 元素入手手段
-
-               // 水素
-               // 水を分解。
-
-               // ヘリウム
-               // 未定。
-
-               // リチウム
-               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.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.addAtomOresLanguage("BoronOre", "ホウ素鉱石", "ja_JP");
-
-               // 炭素
-               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.addAtomOresLanguage("FluorineOre", "フッ素鉱石", "ja_JP");
-
-               // ナトリウム
-               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.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.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.addAtomOresLanguage("PhosphorusOre", "リン鉱石", "ja_JP");
-
-               // 硫黄
-               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.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.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.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("元素名(英)", "元素名(他国語)", "言語");
-
-               //化合物を追加します
-               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", "重曹");
-
-               //化合物のHandlerを設定します
-               this.api.settingCompoundHandler("Water", new CompoundWater());
-
-               //化合物のレシピを追加します
-               this.api.addChemicalCombinationRecipe(new String[]{"Na", "O", "H"}, new Integer[]{1, 1, 1}, new ItemStack(this.itemCompounds, 1, this.api.getCompound("SodiumChloride")));
-               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[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.itemCompounds, 1, this.api.getCompound("Water")));
-
-               //化学電池の追加
-               this.api.addMaterialRecipe(new ItemStack[] {
-                               null,
-                               null,
-                               null,
-                               new ItemStack(this.itemAtoms, 1, chemicalData.ZINC),
-                               null,
-                               new ItemStack(this.itemAtoms, 1, chemicalData.COPPER),
-                               new ItemStack(Item.bucketWater),
-                               new ItemStack(Item.bucketWater),
-                               new ItemStack(Item.bucketWater),
-               },
-               new ItemStack(this.itemChemicalCells, 1, 0),
-               null);
-
-               //手榴弾の追加
-               this.api.addMaterialRecipe(new ItemStack[] {
-                               null,
-                               new ItemStack(Block.stone),
-                               null,
-                               new ItemStack(Block.stone),
-                               new ItemStack(Item.gunpowder),
-                               new ItemStack(Block.stone),
-                               null,
-                               new ItemStack(Block.stone),
-                               null
-               },
-               new ItemStack(this.itemAtomGrenade, 16, 0),
-               new NBTRecipeGrenade()
-                               );
-
-               this.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0),
-                               new Integer[] {ChemiCraftData.HYDROGEN, chemicalData.OXYGEN},
-                               new Integer[] {2, 1});
-
-               this.api.addPyrolysisDecompositionRecipe(new ItemStack(this.itemCompounds, 1, this.api.getCompound("Water")),
-                               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),
-                                       api.getAtomOresAtoms().get(api.getAtomOresName().getKeyList(i)),
-                                       api.getAtomOresAmounts().get(api.getAtomOresName().getKeyList(i)));
-               }
-
-               //Entityを追加
-               LanguageRegistry.instance().addStringLocalization("entity.Dust.name", "en_US", "Dust");
-               EntityRegistry.registerModEntity(EntityDust.class,
-                               "Dust",
-                               ModLoader.getUniqueEntityId(),
-                               this,
-                               250,
-                               5,
-                               true);
+               this.api.addChemicalCell(itemChemicalCells, "ChemicalCell", 1000);
+               this.api.addChemicalCellLanguage("ChemicalCell", "ja_JP", "化学電池");
 
                this.api.addPyrolysisDecompositionFuel(new ItemStack(Item.coal), 2000*8);
        }
 
+
+
        private void apiProcessing(final FMLPostInitializationEvent event) {
                // API用の処理
                for (int i = 0; i < api.getAtomOresName().sizeKeysList(); i++)
@@ -731,6 +427,8 @@ public class ChemiCraft implements Runnable {
 
        }
 
+
+
        private void debug(final FMLPostInitializationEvent event) {
                this.proxy.registerTickHandler();
                this.api.addCompound("Debug");
diff --git a/common/pcc/chemicraft/ChemiCraftConfiguration.java b/common/pcc/chemicraft/ChemiCraftConfiguration.java
new file mode 100644 (file)
index 0000000..c4a08f2
--- /dev/null
@@ -0,0 +1,19 @@
+package pcc.chemicraft;
+
+public class ChemiCraftConfiguration {
+
+       private int nowID;
+
+       public ChemiCraftConfiguration(int baseID) {
+               this.nowID = baseID;
+       }
+
+       public int getNowID() {
+               return this.nowID;
+       }
+
+       public int additionID() {
+               return this.nowID++;
+       }
+
+}
diff --git a/common/pcc/chemicraft/ChemiCraftRegister.java b/common/pcc/chemicraft/ChemiCraftRegister.java
new file mode 100644 (file)
index 0000000..abdb490
--- /dev/null
@@ -0,0 +1,13 @@
+package pcc.chemicraft;
+
+public abstract class ChemiCraftRegister {
+
+       protected ChemiCraft mod;
+
+       public ChemiCraftRegister(ChemiCraft mod) {
+               this.mod = mod;
+       }
+
+       public abstract void start();
+
+}
diff --git a/common/pcc/chemicraft/ChemiCraftRegisterBlock.java b/common/pcc/chemicraft/ChemiCraftRegisterBlock.java
new file mode 100644 (file)
index 0000000..b06939c
--- /dev/null
@@ -0,0 +1,89 @@
+package pcc.chemicraft;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraftforge.common.MinecraftForge;
+import pcc.chemicraft.block.BlockChemicalCombinationTable;
+import pcc.chemicraft.block.BlockChemicalCraftingTable;
+import pcc.chemicraft.block.BlockElectrolysisTable;
+import pcc.chemicraft.block.BlockPyrolysisTable;
+import pcc.chemicraft.block.BlockToolAndWeaponCraftingTable;
+import pcc.chemicraft.ore.BlockAtomOres;
+import pcc.chemicraft.ore.ItemAtomOres;
+import cpw.mods.fml.common.registry.GameRegistry;
+
+public class ChemiCraftRegisterBlock extends ChemiCraftRegister {
+
+       public ChemiCraftRegisterBlock(ChemiCraft mod) {
+               super(mod);
+       }
+
+       @Override
+       public void start() {
+
+               /*
+                * 変数に代入
+                */
+               this.mod.blockPyrolysisTable = new BlockPyrolysisTable(this.mod.pyrolysisTableID, 0, Material.ground).
+                               setHardness(2.0F).
+                               setResistance(0.0F).
+                               setStepSound(Block.soundStoneFootstep).
+                               setBlockName("PyrolysisTable");
+               this.mod.blockElectrolysisTable = new BlockElectrolysisTable(this.mod.electrolysisTableID, 1, Material.ground).
+                               setHardness(2.0F).
+                               setResistance(0.0F).
+                               setStepSound(Block.soundStoneFootstep).
+                               setBlockName("ElectrolysisTable");
+               this.mod.blockChemicalCombinationTable = new BlockChemicalCombinationTable(this.mod.chemicalConbinationTableID, 2, Material.ground).
+                               setHardness(2.0F).
+                               setResistance(0.0F).
+                               setStepSound(Block.soundStoneFootstep).
+                               setBlockName("ChemicalCombinationTable");
+               this.mod.blockToolAndWeaponCraftingTable = new BlockToolAndWeaponCraftingTable(this.mod.toolAndWeaponCraftingTableID, 3, Material.ground).
+                               setHardness(2.0F).
+                               setResistance(0.0F).
+                               setStepSound(Block.soundStoneFootstep).
+                               setBlockName("ToolAndWeaponCraftingTable");
+               this.mod.blockChemicalCraftingTable = new BlockChemicalCraftingTable(this.mod.chemicalCraftingTableID, 4, Material.ground).
+                               setHardness(2.0F).
+                               setResistance(0.0F).
+                               setStepSound(Block.soundStoneFootstep).
+                               setBlockName("ChemicalCraftingTable");
+
+               for (int i = 0; i < this.mod.blockAtomOres.length; i++)
+               {
+                       this.mod.blockAtomOres[i] = new BlockAtomOres(this.mod.atomOresID[i]).
+                                       setHardness(3.0F).
+                                       setResistance(0.0F).
+                                       setStepSound(Block.soundStoneFootstep).
+                                       setBlockName("AtomsOre" + i);
+                       GameRegistry.registerBlock(this.mod.blockAtomOres[i], ItemAtomOres.class, "AtomsOre" + i);
+                       MinecraftForge.setBlockHarvestLevel(this.mod.blockAtomOres[i], "pickaxe", 2);
+               }
+
+               /*
+                * Minecraftに登録
+                */
+               GameRegistry.registerBlock(this.mod.blockPyrolysisTable, "BlockPyrolysisTable");
+               GameRegistry.registerBlock(this.mod.blockChemicalCombinationTable, "BlockChemicalCombinationTable");
+               GameRegistry.registerBlock(this.mod.blockToolAndWeaponCraftingTable, "BlockToolAndWeaponCraftingTable");
+               GameRegistry.registerBlock(this.mod.blockChemicalCraftingTable, "BlockMaterialCraftingTable");
+               GameRegistry.registerBlock(this.mod.blockElectrolysisTable, "BlockElectrolysisTable");
+
+               /*
+                * 名前登録
+                */
+               this.mod.nameAuxiliary.addName(this.mod.blockPyrolysisTable, "PyrolysisTable");
+               this.mod.nameAuxiliary.addName(this.mod.blockPyrolysisTable, "ja_JP", "熱分解台");
+               this.mod.nameAuxiliary.addName(this.mod.blockChemicalCombinationTable, "ChemicalCombinationTable");
+               this.mod.nameAuxiliary.addName(this.mod.blockChemicalCombinationTable, "ja_JP", "化合台");
+               this.mod.nameAuxiliary.addName(this.mod.blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");
+               this.mod.nameAuxiliary.addName(this.mod.blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");
+               this.mod.nameAuxiliary.addName(this.mod.blockChemicalCraftingTable, "ChemicalCraftingTable");
+               this.mod.nameAuxiliary.addName(this.mod.blockChemicalCraftingTable, "ja_JP", "素材製作台");
+               this.mod.nameAuxiliary.addName(this.mod.blockElectrolysisTable, "ElectrolysisTable");
+               this.mod.nameAuxiliary.addName(this.mod.blockElectrolysisTable, "ja_JP", "電気分解台");
+
+       }
+
+}
diff --git a/common/pcc/chemicraft/ChemiCraftRegisterChemicalRecipe.java b/common/pcc/chemicraft/ChemiCraftRegisterChemicalRecipe.java
new file mode 100644 (file)
index 0000000..9ccaab2
--- /dev/null
@@ -0,0 +1,223 @@
+package pcc.chemicraft;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import pcc.chemicraft.gen.EnumOreSpawnFrequency;
+
+public class ChemiCraftRegisterChemicalRecipe extends ChemiCraftRegister {
+
+       public ChemiCraftRegisterChemicalRecipe(ChemiCraft mod) {
+               super(mod);
+       }
+
+       @Override
+       public void start() {
+               // 元素入手手段
+
+               // 水素
+               // 水を分解。
+
+               // ヘリウム
+               // 未定。
+
+               // リチウム
+               this.mod.api.addAtomOres(
+                               "LithiumOre",
+                               new String[] { "Li", "Al", "Si", "O" },
+                               new Integer[] { 1, 1, 4, 10 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // LiAlSi4O10
+               this.mod.api.addAtomOresLanguage("LithiumOre", "リチウム鉱石", "ja_JP");
+
+               // ベリリウム
+               this.mod.api.addAtomOres(
+                               "BerylliumOre",
+                               new String[] { "Be", "Al", "Si", "O" },
+                               new Integer[] { 3, 2, 6, 18 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // Be3Al2Si6O18
+               this.mod.api.addAtomOresLanguage("BerylliumOre", "ベリリウム鉱石", "ja_JP");
+
+               // ホウ素
+               this.mod.api.addAtomOres(
+                               "BoronOre",
+                               new String[] { "Na", "Ca", "B", "O", "H" },
+                               new Integer[] { 1, 1, 5, 17, 16 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // NaCaB5O6(OH)6・5H2O
+               this.mod.api.addAtomOresLanguage("BoronOre", "ホウ素鉱石", "ja_JP");
+
+               // 炭素
+               this.mod.api.addPyrolysisDecompositionRecipe(
+                               new ItemStack(Block.oreCoal),
+                               new Integer[] { this.mod.chemicalData.CARBON },
+                               new Integer[] { 1 });
+
+               // フッ素
+               this.mod.api.addAtomOres(
+                               "FluorineOre",
+                               new String[] { "Ca", "F" },
+                               new Integer[] { 1, 2 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // CaF2
+               this.mod.api.addAtomOresLanguage("FluorineOre", "フッ素鉱石", "ja_JP");
+
+               // ナトリウム
+               this.mod.api.addAtomOres(
+                               "SodiumOre",
+                               new String[] { "Na", "Cl" },
+                               new Integer[] { 1, 1 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // NaCl
+               this.mod.api.addAtomOresLanguage("SodiumOre", "ナトリウム鉱石", "ja_JP");
+
+               // マグネシウム
+               this.mod.api.addAtomOres(
+                               "MagnesiumOre",
+                               new String[] { "Ca", "Mg", "C", "O" },
+                               new Integer[] { 1, 1, 2, 6 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // CaMg(CO3)2
+               this.mod.api.addAtomOresLanguage("MagnesiumOre", "マグネシウム鉱石", "ja_JP");
+
+               // アルミニウム
+               this.mod.api.addAtomOres(
+                               "AluminiumOre",
+                               new String[] { "Al", "O", "H" },
+                               new Integer[] { 3, 3, 3 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // Al(OH)3
+               this.mod.api.addAtomOresLanguage("AluminiumOre", "アルミニウム鉱石", "ja_JP");
+
+               // ケイ素
+               // 1.5まで保留。
+
+               // リン
+               this.mod.api.addAtomOres(
+                               "PhosphorusOre",
+                               new String[] { "Ca", "P", "O", "F" },
+                               new Integer[] { 5, 3, 12, 1 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // Ca5(PO4)3F
+               this.mod.api.addAtomOresLanguage("PhosphorusOre", "リン鉱石", "ja_JP");
+
+               // 硫黄
+               this.mod.api.addAtomOres(
+                               "SulfurOre",
+                               new String[] { "S" },
+                               new Integer[] { 1 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // S
+               this.mod.api.addAtomOresLanguage("SulfurOre", "硫黄鉱石", "ja_JP");
+
+               // カリウム
+               this.mod.api.addAtomOres(
+                               "PotassiumOre",
+                               new String[] { "K", "Cl" },
+                               new Integer[] { 1, 1 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // KCl
+               this.mod.api.addAtomOresLanguage("PotassiumOre", "カリウム鉱石", "ja_JP");
+
+               // カルシウム
+               this.mod.api.addAtomOres(
+                               "CalciumOre",
+                               new String[] { "Ca", "C", "O" },
+                               new Integer[] { 1, 1, 3 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // CaCO3
+               this.mod.api.addAtomOresLanguage("CalciumOre", "カルシウム鉱石", "ja_JP");
+
+               // スカンジウム
+               this.mod.api.addAtomOres(
+                               "ScandiumOre",
+                               new String[] { "Sc", "Y", "Si", "O" },
+                               new Integer[] { 2, 2, 2, 7 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // (Sc,Y)2Si2O7
+               this.mod.api.addAtomOresLanguage("ScandiumOre", "スカンジウム鉱石", "ja_JP");
+
+               // チタン
+               this.mod.api.addAtomOres(
+                               "TitaniumOre",
+                               new String[] { "Ti", "O" },
+                               new Integer[] { 1, 2 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // TiO2
+               this.mod.api.addAtomOresLanguage("TitaniumOre", "チタン鉱石", "ja_JP");
+
+               // バナジウム
+               this.mod.api.addAtomOres(
+                               "VanadiumOre",
+                               new String[] { "K", "U", "O", "V", "H" },
+                               new Integer[] { 2, 2, 15, 2, 6 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               // K2(UO2)2V2O8・3H2O
+               this.mod.api.addAtomOresLanguage("VanadiumOre", "バナジウム鉱石", "ja_JP");
+
+               // クロム
+               this.mod.api.addAtomOres(
+                               "Chromium",
+                               new String[] { "Fe", "Cr", "O" },
+                               new Integer[] { 1, 2, 4 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               this.mod.api.addAtomOresLanguage("Chromium", "クロム鉱石", "ja_JP");
+               // FeCr2O4
+
+               // マンガン
+               this.mod.api.addAtomOres(
+                               "ManganeseOre",
+                               new String[] { "Mn", "O" },
+                               new Integer[] { 1, 2 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               this.mod.api.addAtomOresLanguage("ManganeseOre", "ja_JP", "マンガン鉱石");
+               // MnO2
+
+               // コバルト
+               this.mod.api.addAtomOres(
+                               "CobaltOre",
+                               new String[] { "Co", "As", "S" },
+                               new Integer[] { 1, 1, 1 },
+                               this.mod.atomOresID[this.mod.api.getAtomOresLastIndex()],
+                               8,
+                               EnumOreSpawnFrequency.NORMAL);
+               this.mod.api.addAtomOresLanguage("CobaltOre", "ja_JP", "コバルト鉱石");
+               // CoAsS
+
+               // this.mod.api.addAtomOres("元素名(英)", new String[]{"元素"}, new Integer[]{<数>}, this.atomOresID[this.mod.api.getAtomOresLastIndex()], 8, EnumOreSpawnFrequency.NORMAL); // 化学式
+               // this.mod.api.addAtomOresLanguage("元素名(英)", "元素名(他国語)", "言語");
+       }
+
+}
diff --git a/common/pcc/chemicraft/ChemiCraftRegisterCompounds.java b/common/pcc/chemicraft/ChemiCraftRegisterCompounds.java
new file mode 100644 (file)
index 0000000..af3e333
--- /dev/null
@@ -0,0 +1,19 @@
+package pcc.chemicraft;
+
+public class ChemiCraftRegisterCompounds extends ChemiCraftRegister {
+
+       public ChemiCraftRegisterCompounds(ChemiCraft mod) {
+               super(mod);
+       }
+
+       @Override
+       public void start() {
+               this.mod.api.addCompound("ja_JP", "ChlorousAcid", "亜塩素酸");
+               this.mod.api.addCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");
+               this.mod.api.addCompound("ja_JP", "CarbonDioxide", "二酸化炭素");
+               this.mod.api.addCompound("ja_JP", "Water", "水");
+               this.mod.api.addCompound("ja_JP", "SodiumChloride", "塩化ナトリウム");
+               this.mod.api.addCompound("ja_JP", "SodiumBicarbonate", "重曹");
+       }
+
+}
diff --git a/common/pcc/chemicraft/ChemiCraftRegisterCompoundsHandler.java b/common/pcc/chemicraft/ChemiCraftRegisterCompoundsHandler.java
new file mode 100644 (file)
index 0000000..cce0d19
--- /dev/null
@@ -0,0 +1,16 @@
+package pcc.chemicraft;
+
+import pcc.chemicraft.compounds.CompoundWater;
+
+public class ChemiCraftRegisterCompoundsHandler extends ChemiCraftRegister {
+
+       public ChemiCraftRegisterCompoundsHandler(ChemiCraft mod) {
+               super(mod);
+       }
+
+       @Override
+       public void start() {
+               this.mod.api.settingCompoundHandler("Water", new CompoundWater());
+       }
+
+}
diff --git a/common/pcc/chemicraft/ChemiCraftRegisterEntitys.java b/common/pcc/chemicraft/ChemiCraftRegisterEntitys.java
new file mode 100644 (file)
index 0000000..a754a2e
--- /dev/null
@@ -0,0 +1,26 @@
+package pcc.chemicraft;
+
+import net.minecraft.src.ModLoader;
+import pcc.chemicraft.entity.EntityDust;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.LanguageRegistry;
+
+public class ChemiCraftRegisterEntitys extends ChemiCraftRegister {
+
+       public ChemiCraftRegisterEntitys(ChemiCraft mod) {
+               super(mod);
+       }
+
+       @Override
+       public void start() {
+               LanguageRegistry.instance().addStringLocalization("entity.Dust.name", "en_US", "Dust");
+               EntityRegistry.registerModEntity(EntityDust.class,
+                               "Dust",
+                               ModLoader.getUniqueEntityId(),
+                               this.mod,
+                               250,
+                               5,
+                               true);
+       }
+
+}
diff --git a/common/pcc/chemicraft/ChemiCraftRegisterItem.java b/common/pcc/chemicraft/ChemiCraftRegisterItem.java
new file mode 100644 (file)
index 0000000..427b7ea
--- /dev/null
@@ -0,0 +1,49 @@
+package pcc.chemicraft;
+
+import pcc.chemicraft.item.ItemAtoms;
+import pcc.chemicraft.item.ItemAtomsGrenade;
+import pcc.chemicraft.item.ItemChemiCell;
+import pcc.chemicraft.item.ItemCompounds;
+import pcc.chemicraft.item.ItemDust;
+import pcc.chemicraft.item.ItemGasCollectingBottle;
+import pcc.chemicraft.item.ItemRadiationBallet;
+import pcc.chemicraft.item.ItemRadiationGun;
+
+public class ChemiCraftRegisterItem extends ChemiCraftRegister {
+
+       public ChemiCraftRegisterItem(ChemiCraft mod) {
+               super(mod);
+       }
+
+       @Override
+       public void start() {
+               /*
+                * 代入
+                */
+               this.mod.itemAtoms = new ItemAtoms(this.mod.atomsID).setItemName("atoms");
+               this.mod.itemCompounds = new ItemCompounds(this.mod.compoundsID).setItemName("compounds");
+               this.mod.itemGasCollectingBottle = new ItemGasCollectingBottle(this.mod.gasCollectingBottleID).setItemName("gasCollectingBottle").setIconIndex(0);
+               this.mod.itemAtomGrenade = new ItemAtomsGrenade(this.mod.atomGrenadeID).setItemName("grenade").setIconIndex(1);
+               this.mod.itemChemicalCells = new ItemChemiCell(this.mod.chemicalCellsID).setItemName("chemiCell").setIconIndex(3);
+               this.mod.itemDust = new ItemDust(15000).setItemName("dust").setIconIndex(12);
+               this.mod.itemRadiationGun = new ItemRadiationGun(this.mod.radiationGunID).setIconIndex(4).setItemName("RadiationGun");
+               this.mod.itemRadiationBallet = new ItemRadiationBallet(this.mod.radiationBalletID).setIconIndex(5).setItemName("RadiationBallet");
+
+               /*
+                * 名前登録&Minecraftに登録
+                */
+               this.mod.nameAuxiliary.addName(this.mod.itemAtoms, ChemiCraft.ATOMSNAME);
+               this.mod.nameAuxiliary.addName(this.mod.itemAtoms, "ja_JP", ChemiCraft.ATOMSNAMEJP);
+               this.mod.nameAuxiliary.addName(this.mod.itemGasCollectingBottle, "GasCollectingBottle");
+               this.mod.nameAuxiliary.addName(this.mod.itemGasCollectingBottle, "ja_JP", "集気瓶");
+               this.mod.nameAuxiliary.addName(this.mod.itemAtomGrenade, "AtomGrenade");
+               this.mod.nameAuxiliary.addName(this.mod.itemAtomGrenade, "ja_JP", "元素手榴弾");
+               this.mod.nameAuxiliary.addName(this.mod.itemDust, "dust");
+               this.mod.nameAuxiliary.addName(this.mod.itemDust, "ja_JP", "粉塵");
+               this.mod.nameAuxiliary.addName(this.mod.itemRadiationGun, "RadiationGun");
+               this.mod.nameAuxiliary.addName(this.mod.itemRadiationGun, "ja_JP", "放射線銃");
+               this.mod.nameAuxiliary.addName(this.mod.itemRadiationBallet, "RadiationBallet");
+               this.mod.nameAuxiliary.addName(this.mod.itemRadiationGun, "ja_JP", "放射線弾");
+       }
+
+}
diff --git a/common/pcc/chemicraft/ChemiCraftRegisterRecipe.java b/common/pcc/chemicraft/ChemiCraftRegisterRecipe.java
new file mode 100644 (file)
index 0000000..fbe4d65
--- /dev/null
@@ -0,0 +1,119 @@
+package pcc.chemicraft;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import pcc.chemicraft.util.NBTRecipeGrenade;
+import cpw.mods.fml.common.registry.GameRegistry;
+
+public class ChemiCraftRegisterRecipe extends ChemiCraftRegister {
+
+       public ChemiCraftRegisterRecipe(ChemiCraft mod) {
+               super(mod);
+       }
+
+       @Override
+       public void start() {
+
+               /*
+                * 科学作業台のレシピ
+                */
+               GameRegistry.addRecipe(new ItemStack(this.mod.blockPyrolysisTable),
+                               new Object[]{
+                       "XYX", "ZAZ", "ZZZ",
+                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
+                       Character.valueOf('Y'), new ItemStack(Block.workbench),
+                       Character.valueOf('Z'), new ItemStack(Block.stone),
+                       Character.valueOf('A'), new ItemStack(Item.bucketLava),
+               });
+
+               GameRegistry.addRecipe(new ItemStack(this.mod.blockChemicalCombinationTable),
+                               new Object[]{
+                       "XYX", "ZAZ", "ZZZ",
+                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
+                       Character.valueOf('Y'), new ItemStack(Block.workbench),
+                       Character.valueOf('Z'), new ItemStack(Block.stone),
+                       Character.valueOf('A'), new ItemStack(Block.obsidian),
+               });
+
+               GameRegistry.addRecipe(new ItemStack(this.mod.blockToolAndWeaponCraftingTable),
+                               new Object[]{
+                       "XYX", "ZAZ", "ZZZ",
+                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
+                       Character.valueOf('Y'), new ItemStack(Block.workbench),
+                       Character.valueOf('Z'), new ItemStack(Block.stone),
+                       Character.valueOf('A'), new ItemStack(Item.pickaxeSteel),
+               });
+
+               GameRegistry.addRecipe(new ItemStack(this.mod.blockChemicalCraftingTable),
+                               new Object[]{
+                       "XYX", "ZAZ", "ZZZ",
+                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
+                       Character.valueOf('Y'), new ItemStack(Block.workbench),
+                       Character.valueOf('Z'), new ItemStack(Block.stone),
+                       Character.valueOf('A'), new ItemStack(this.mod.itemAtoms, 1, 0),
+               });
+
+               /*
+                * 化合物のレシピ
+                */
+               this.mod.api.addChemicalCombinationRecipe(new String[]{"Na", "O", "H"}, new Integer[]{1, 1, 1}, new ItemStack(this.mod.itemCompounds, 1, this.mod.api.getCompound("SodiumChloride")));
+               this.mod.api.addChemicalCombinationRecipe(new String[]{"H", "O", "Cl"}, new Integer[]{1, 2, 1}, new ItemStack(this.mod.itemCompounds, 1, this.mod.api.getCompound("ChlorousAcid")));
+               this.mod.api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.mod.itemCompounds, 1, this.mod.api.getCompound("Water")));
+
+               /*
+                * 素材制作代のレシピ
+                */
+
+               //化学電池の追加
+               this.mod.api.addMaterialRecipe(new ItemStack[] {
+                               null,
+                               null,
+                               null,
+                               new ItemStack(this.mod.itemAtoms, 1, this.mod.chemicalData.ZINC),
+                               null,
+                               new ItemStack(this.mod.itemAtoms, 1, this.mod.chemicalData.COPPER),
+                               new ItemStack(Item.bucketWater),
+                               new ItemStack(Item.bucketWater),
+                               new ItemStack(Item.bucketWater),
+               },
+               new ItemStack(this.mod.itemChemicalCells, 1, 0),
+               null);
+
+               //手榴弾の追加
+               this.mod.api.addMaterialRecipe(new ItemStack[] {
+                               null,
+                               new ItemStack(Block.stone),
+                               null,
+                               new ItemStack(Block.stone),
+                               new ItemStack(Item.gunpowder),
+                               new ItemStack(Block.stone),
+                               null,
+                               new ItemStack(Block.stone),
+                               null
+               },
+               new ItemStack(this.mod.itemAtomGrenade, 16, 0),
+               new NBTRecipeGrenade()
+                               );
+
+               /*
+                * 熱分解台のレシピ
+                */
+               this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0),
+                               new Integer[] {ChemiCraftData.HYDROGEN, this.mod.chemicalData.OXYGEN},
+                               new Integer[] {2, 1});
+
+               this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(this.mod.itemCompounds, 1, this.mod.api.getCompound("Water")),
+                               new Integer[] {ChemiCraftData.HYDROGEN, this.mod.chemicalData.OXYGEN},
+                               new Integer[] {2, 1});
+
+               for (int i = 0; i < this.mod.api.getAtomOresName().sizeKeysList(); i++){
+                       this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(this.mod.blockAtomOres[i / 16], 1, i - i / 16 * 16),
+                                       this.mod.api.getAtomOresAtoms().get(this.mod.api.getAtomOresName().getKeyList(i)),
+                                       this.mod.api.getAtomOresAmounts().get(this.mod.api.getAtomOresName().getKeyList(i)));
+               }
+
+
+       }
+
+}
diff --git a/common/pcc/chemicraft/ChemiCraftRegisterTileEntity.java b/common/pcc/chemicraft/ChemiCraftRegisterTileEntity.java
new file mode 100644 (file)
index 0000000..1061d48
--- /dev/null
@@ -0,0 +1,28 @@
+package pcc.chemicraft;
+
+import pcc.chemicraft.tileentity.TileEntityChemicalCombinationTable;
+import pcc.chemicraft.tileentity.TileEntityChemicalCraftingTable;
+import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
+import pcc.chemicraft.tileentity.TileEntityPyrolysisTable;
+import pcc.chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
+import cpw.mods.fml.common.registry.GameRegistry;
+
+public class ChemiCraftRegisterTileEntity extends ChemiCraftRegister {
+
+       public ChemiCraftRegisterTileEntity(ChemiCraft mod) {
+               super(mod);
+       }
+
+       @Override
+       public void start() {
+               /*
+                * MinecraftにTileEntityを登録
+                */
+               GameRegistry.registerTileEntity(TileEntityPyrolysisTable.class, "TileEntityPyrolysisTable");
+               GameRegistry.registerTileEntity(TileEntityChemicalCombinationTable.class, "TileEntityChemicalCombinationTable");
+               GameRegistry.registerTileEntity(TileEntityToolAndWeaponCraftingTable.class, "TileEntityToolAndWeaponCraftingTable");
+               GameRegistry.registerTileEntity(TileEntityChemicalCraftingTable.class, "TileEntityChemicalCraftingTable");
+               GameRegistry.registerTileEntity(TileEntityElectrolysisTable.class, "TileEntityElectrolysisTable");
+       }
+
+}