OSDN Git Service

9a37774d8739847c118dc2a7e5fdfd007b816177
[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.ItemFood;
5 import net.minecraft.item.ItemStack;
6 import pcc.chemicraft.ChemiCraft;
7 import pcc.chemicraft.core.item.ItemAtoms;
8 import pcc.chemicraft.core.item.ItemChemicalCell;
9 import pcc.chemicraft.core.item.ItemCompounds;
10 import pcc.chemicraft.core.item.ItemGasCollectingBottle;
11
12 /**
13  * アイテムを追加します
14  * @author mozipi,ponkotate
15  */
16 public class ChemiCraftRegisterItem extends ChemiCraftCoreRegister {
17
18         public ChemiCraftRegisterItem(ChemiCraftCore mod) {
19                 super(mod);
20         }
21
22         @Override
23         public void start() {
24                 //Itemを変数に代入
25                 this.mod.itemAtoms = new ItemAtoms(this.mod.atomsID).setUnlocalizedName(ChemiCraft.TEXTURE + "atoms");
26                 this.mod.itemCompounds = new ItemCompounds(this.mod.compoundsID).setUnlocalizedName("compounds");
27                 this.mod.itemGasCollectingBottle = new ItemGasCollectingBottle(this.mod.gasCollectingBottleID).setUnlocalizedName("gasCollectingBottle");
28                 this.mod.itemChemicalCells = new ItemChemicalCell(this.mod.chemicalCellsID).setUnlocalizedName("chemicalCell");
29                 this.mod.itemPear = new ItemFood(this.mod.pearID, 4, 0.4F, false){
30                         public int getColorFromItemStack(ItemStack par1ItemStack,int par2){
31                                 return 0x66FF66;
32                                 }
33                         }.setCreativeTab(CreativeTabs.tabFood).setUnlocalizedName(ChemiCraft.TEXTURE + "Pear");
34
35                 //名前登録&Minecraftに登録
36                 this.mod.nameAuxiliary.addName(this.mod.itemAtoms, ChemiCraftCore.ATOMSNAME);
37                 this.mod.nameAuxiliary.addName(this.mod.itemAtoms, "ja_JP", ChemiCraftCore.ATOMSNAMEJP);
38                 this.mod.nameAuxiliary.addName(this.mod.itemGasCollectingBottle, "GasCollectingBottle");
39                 this.mod.nameAuxiliary.addName(this.mod.itemGasCollectingBottle, "ja_JP", "集気瓶");
40                 this.mod.nameAuxiliary.addName(this.mod.itemChemicalCells, "ChemicalCell");
41                 this.mod.nameAuxiliary.addName(this.mod.itemChemicalCells, "ja_JP",  "化学電池");
42                 this.mod.nameAuxiliary.addName(this.mod.itemPear, "Pear");
43                 this.mod.nameAuxiliary.addName(this.mod.itemPear, "ja_JP",  "梨");
44
45         }
46
47 }