OSDN Git Service

大規模なソース仕様変更
[chemicraft/chemicraft.git] / common / pcc / chemicraft / ChemiCraftRegisterBlock.java
1 package pcc.chemicraft;
2
3 import net.minecraft.block.Block;
4 import net.minecraft.block.material.Material;
5 import net.minecraftforge.common.MinecraftForge;
6 import pcc.chemicraft.block.BlockChemicalCombinationTable;
7 import pcc.chemicraft.block.BlockChemicalCraftingTable;
8 import pcc.chemicraft.block.BlockElectrolysisTable;
9 import pcc.chemicraft.block.BlockPyrolysisTable;
10 import pcc.chemicraft.block.BlockToolAndWeaponCraftingTable;
11 import pcc.chemicraft.ore.BlockAtomOres;
12 import pcc.chemicraft.ore.ItemAtomOres;
13 import cpw.mods.fml.common.registry.GameRegistry;
14
15 public class ChemiCraftRegisterBlock extends ChemiCraftRegister {
16
17         public ChemiCraftRegisterBlock(ChemiCraft mod) {
18                 super(mod);
19         }
20
21         @Override
22         public void start() {
23
24                 /*
25                  * 変数に代入
26                  */
27                 this.mod.blockPyrolysisTable = new BlockPyrolysisTable(this.mod.pyrolysisTableID, 0, Material.ground).
28                                 setHardness(2.0F).
29                                 setResistance(0.0F).
30                                 setStepSound(Block.soundStoneFootstep).
31                                 setBlockName("PyrolysisTable");
32                 this.mod.blockElectrolysisTable = new BlockElectrolysisTable(this.mod.electrolysisTableID, 1, Material.ground).
33                                 setHardness(2.0F).
34                                 setResistance(0.0F).
35                                 setStepSound(Block.soundStoneFootstep).
36                                 setBlockName("ElectrolysisTable");
37                 this.mod.blockChemicalCombinationTable = new BlockChemicalCombinationTable(this.mod.chemicalConbinationTableID, 2, Material.ground).
38                                 setHardness(2.0F).
39                                 setResistance(0.0F).
40                                 setStepSound(Block.soundStoneFootstep).
41                                 setBlockName("ChemicalCombinationTable");
42                 this.mod.blockToolAndWeaponCraftingTable = new BlockToolAndWeaponCraftingTable(this.mod.toolAndWeaponCraftingTableID, 3, Material.ground).
43                                 setHardness(2.0F).
44                                 setResistance(0.0F).
45                                 setStepSound(Block.soundStoneFootstep).
46                                 setBlockName("ToolAndWeaponCraftingTable");
47                 this.mod.blockChemicalCraftingTable = new BlockChemicalCraftingTable(this.mod.chemicalCraftingTableID, 4, Material.ground).
48                                 setHardness(2.0F).
49                                 setResistance(0.0F).
50                                 setStepSound(Block.soundStoneFootstep).
51                                 setBlockName("ChemicalCraftingTable");
52
53                 for (int i = 0; i < this.mod.blockAtomOres.length; i++)
54                 {
55                         this.mod.blockAtomOres[i] = new BlockAtomOres(this.mod.atomOresID[i]).
56                                         setHardness(3.0F).
57                                         setResistance(0.0F).
58                                         setStepSound(Block.soundStoneFootstep).
59                                         setBlockName("AtomsOre" + i);
60                         GameRegistry.registerBlock(this.mod.blockAtomOres[i], ItemAtomOres.class, "AtomsOre" + i);
61                         MinecraftForge.setBlockHarvestLevel(this.mod.blockAtomOres[i], "pickaxe", 2);
62                 }
63
64                 /*
65                  * Minecraftに登録
66                  */
67                 GameRegistry.registerBlock(this.mod.blockPyrolysisTable, "BlockPyrolysisTable");
68                 GameRegistry.registerBlock(this.mod.blockChemicalCombinationTable, "BlockChemicalCombinationTable");
69                 GameRegistry.registerBlock(this.mod.blockToolAndWeaponCraftingTable, "BlockToolAndWeaponCraftingTable");
70                 GameRegistry.registerBlock(this.mod.blockChemicalCraftingTable, "BlockMaterialCraftingTable");
71                 GameRegistry.registerBlock(this.mod.blockElectrolysisTable, "BlockElectrolysisTable");
72
73                 /*
74                  * 名前登録
75                  */
76                 this.mod.nameAuxiliary.addName(this.mod.blockPyrolysisTable, "PyrolysisTable");
77                 this.mod.nameAuxiliary.addName(this.mod.blockPyrolysisTable, "ja_JP", "熱分解台");
78                 this.mod.nameAuxiliary.addName(this.mod.blockChemicalCombinationTable, "ChemicalCombinationTable");
79                 this.mod.nameAuxiliary.addName(this.mod.blockChemicalCombinationTable, "ja_JP", "化合台");
80                 this.mod.nameAuxiliary.addName(this.mod.blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");
81                 this.mod.nameAuxiliary.addName(this.mod.blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");
82                 this.mod.nameAuxiliary.addName(this.mod.blockChemicalCraftingTable, "ChemicalCraftingTable");
83                 this.mod.nameAuxiliary.addName(this.mod.blockChemicalCraftingTable, "ja_JP", "素材製作台");
84                 this.mod.nameAuxiliary.addName(this.mod.blockElectrolysisTable, "ElectrolysisTable");
85                 this.mod.nameAuxiliary.addName(this.mod.blockElectrolysisTable, "ja_JP", "電気分解台");
86
87         }
88
89 }