OSDN Git Service

0f6662bb2ba7c48051aa2ecdc5358ba94fb3297c
[chemicraft/chemicraft.git] / common / pcc / chemicraft / base / ChemiCraftRegisterBlock.java
1 package pcc.chemicraft.base;
2
3 import net.minecraft.block.Block;
4 import net.minecraftforge.common.MinecraftForge;
5 import pcc.chemicraft.base.gen.WorldGenAtomsOre;
6 import pcc.chemicraft.base.ore.BlockAtomOres;
7 import pcc.chemicraft.base.ore.ItemAtomOres;
8 import cpw.mods.fml.common.registry.GameRegistry;
9
10 public class ChemiCraftRegisterBlock extends ChemiCraftBaseRegister {
11
12         public ChemiCraftRegisterBlock(ChemiCraftBase mod) {
13                 super(mod);
14         }
15
16         @Override
17         public void start() {
18
19                 /*
20                  * 変数に代入
21                  */
22                 for (int i = 0; i < this.mod.blockAtomOres.length; i++)
23                 {
24                         this.mod.blockAtomOres[i] = new BlockAtomOres(this.mod.atomOresID[i]).
25                                         setHardness(3.0F).
26                                         setResistance(0.0F).
27                                         setStepSound(Block.soundStoneFootstep).
28                                         setBlockName("AtomsOre" + i);
29                         GameRegistry.registerBlock(this.mod.blockAtomOres[i], ItemAtomOres.class, "AtomsOre" + i);
30                         MinecraftForge.setBlockHarvestLevel(this.mod.blockAtomOres[i], "pickaxe", 2);
31                 }
32
33         }
34
35 }