OSDN Git Service

Merge branch 'master' of https://scm.sourceforge.jp/gitroot/chemicraft/chemicraft
[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 /**
12  * アイテムを追加します
13  * @author mozipi,ponkotate
14  */
15 public class ChemiCraftRegisterItem extends ChemiCraftCoreRegister {
16
17         public ChemiCraftRegisterItem(ChemiCraftCore mod) {
18                 super(mod);
19         }
20
21         @Override
22         public void start() {
23                 //Itemを変数に代入
24                 this.mod.itemAtoms = new ItemAtoms(this.mod.atomsID).setItemName("atoms");
25                 this.mod.itemCompounds = new ItemCompounds(this.mod.compoundsID).setItemName("compounds");
26                 this.mod.itemGasCollectingBottle = new ItemGasCollectingBottle(this.mod.gasCollectingBottleID).setItemName("gasCollectingBottle").setIconIndex(0);
27                 this.mod.itemChemicalCells = new ItemChemiCell(this.mod.chemicalCellsID).setItemName("chemiCell").setIconIndex(3);
28                 this.mod.itemPear = new OldItemFood(this.mod.pearID, 4, 0.4F, false){
29                         public int getColorFromItemStack(ItemStack par1ItemStack,int par2){
30                                 return 0x66FF66;
31                                 }
32                         }.setIconIndex(11).setCreativeTab(CreativeTabs.tabFood).setItemName("Pear");
33
34                         //名前登録&Minecraftに登録
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.itemChemicalCells, "ChemicalCell");
40                 this.mod.nameAuxiliary.addName(this.mod.itemChemicalCells, "ja_JP",  "化学電池");
41                 this.mod.api.addElectrolysisDecompositionFuel(new ItemStack(this.mod.itemChemicalCells), 1000);
42                 this.mod.nameAuxiliary.addName(this.mod.itemPear, "Pear");
43                 this.mod.nameAuxiliary.addName(this.mod.itemPear, "ja_JP",  "梨");
44
45         }
46
47 }