OSDN Git Service

9f1a722a3527057b2094031faa086a6d2b697d4f
[chemicraft/chemicraft.git] / common / pcc / chemicraft / core / ChemiCraftRegisterItem.java
1 package pcc.chemicraft.core;
2
3 import net.minecraft.creativetab.CreativeTabs;
4 import net.minecraft.item.ItemStack;
5 import pcc.chemicraft.core.item.ItemAtoms;
6 import pcc.chemicraft.core.item.ItemChemiCell;
7 import pcc.chemicraft.core.item.ItemCompounds;
8 import pcc.chemicraft.core.item.ItemGasCollectingBottle;
9 import pcc.chemicraft.util.OldItemFood;
10
11 public class ChemiCraftRegisterItem extends ChemiCraftCoreRegister {
12
13         public ChemiCraftRegisterItem(ChemiCraftCore mod) {
14                 super(mod);
15         }
16
17         @Override
18         public void start() {
19                 /*
20                  * 代入
21                  */
22                 this.mod.itemAtoms = new ItemAtoms(this.mod.atomsID).setItemName("atoms");
23                 this.mod.itemCompounds = new ItemCompounds(this.mod.compoundsID).setItemName("compounds");
24                 this.mod.itemGasCollectingBottle = new ItemGasCollectingBottle(this.mod.gasCollectingBottleID).setItemName("gasCollectingBottle").setIconIndex(0);
25                 this.mod.itemChemicalCells = new ItemChemiCell(this.mod.chemicalCellsID).setItemName("chemiCell").setIconIndex(3);
26                 this.mod.itemPear = new OldItemFood(this.mod.pearID, 4, 0.4F, false){
27                         public int getColorFromItemStack(ItemStack par1ItemStack,int par2){
28                                 return 0x66FF66;
29                                 }
30                         }.setIconIndex(11).setCreativeTab(CreativeTabs.tabFood).setItemName("Pear");
31
32                 /*
33                  * 名前登録&Minecraftに登録
34                  */
35                 this.mod.nameAuxiliary.addName(this.mod.itemAtoms, ChemiCraftCore.ATOMSNAME);
36                 this.mod.nameAuxiliary.addName(this.mod.itemAtoms, "ja_JP", ChemiCraftCore.ATOMSNAMEJP);
37                 this.mod.nameAuxiliary.addName(this.mod.itemGasCollectingBottle, "GasCollectingBottle");
38                 this.mod.nameAuxiliary.addName(this.mod.itemGasCollectingBottle, "ja_JP", "集気瓶");
39                 this.mod.nameAuxiliary.addName(this.mod.itemPear, "Pear");
40                 this.mod.nameAuxiliary.addName(this.mod.itemPear, "ja_JP",  "梨");
41
42         }
43
44 }