X-Git-Url: http://git.sourceforge.jp/view?p=chemicraft%2Fchemicraft.git;a=blobdiff_plain;f=common%2Fpcc%2Fchemicraft%2Fcore%2FChemiCraftRegisterItem.java;h=4106ec745f96ac738359fe6771b4a33d02133979;hp=55fdb3503b0f8f785a8cf5e09cd6b5c00aa279d1;hb=c3664633cb11674281eeeb38aee4f9bbd4ee0ff7;hpb=2557d5e9a4ed4e49370213f0e83743ec27c48e02 diff --git a/common/pcc/chemicraft/core/ChemiCraftRegisterItem.java b/common/pcc/chemicraft/core/ChemiCraftRegisterItem.java index 55fdb35..4106ec7 100644 --- a/common/pcc/chemicraft/core/ChemiCraftRegisterItem.java +++ b/common/pcc/chemicraft/core/ChemiCraftRegisterItem.java @@ -8,6 +8,10 @@ import pcc.chemicraft.core.item.ItemCompounds; import pcc.chemicraft.core.item.ItemGasCollectingBottle; import pcc.chemicraft.util.OldItemFood; +/** + * アイテムを追加します + * @author mozipi,ponkotate + */ public class ChemiCraftRegisterItem extends ChemiCraftCoreRegister { public ChemiCraftRegisterItem(ChemiCraftCore mod) { @@ -16,28 +20,25 @@ public class ChemiCraftRegisterItem extends ChemiCraftCoreRegister { @Override public void start() { - /* - * 代入 - */ - this.mod.itemAtoms = new ItemAtoms(this.mod.atomsID).setItemName("atoms"); - this.mod.itemCompounds = new ItemCompounds(this.mod.compoundsID).setItemName("compounds"); - this.mod.itemGasCollectingBottle = new ItemGasCollectingBottle(this.mod.gasCollectingBottleID).setItemName("gasCollectingBottle").setIconIndex(0); - this.mod.itemChemicalCells = new ItemChemiCell(this.mod.chemicalCellsID).setItemName("chemiCell").setIconIndex(3); + //Itemを変数に代入 + this.mod.itemAtoms = new ItemAtoms(this.mod.atomsID).setUnlocalizedName("atoms"); + this.mod.itemCompounds = new ItemCompounds(this.mod.compoundsID).setUnlocalizedName("compounds"); + this.mod.itemGasCollectingBottle = new ItemGasCollectingBottle(this.mod.gasCollectingBottleID).setUnlocalizedName("gasCollectingBottle"); + this.mod.itemChemicalCells = new ItemChemiCell(this.mod.chemicalCellsID).setUnlocalizedName("chemiCell"); this.mod.itemPear = new OldItemFood(this.mod.pearID, 4, 0.4F, false){ public int getColorFromItemStack(ItemStack par1ItemStack,int par2){ return 0x66FF66; } - }.setIconIndex(11).setCreativeTab(CreativeTabs.tabFood).setItemName("Pear"); + }.setCreativeTab(CreativeTabs.tabFood).setUnlocalizedName("Pear"); - /* - * 名前登録&Minecraftに登録 - */ + //名前登録&Minecraftに登録 this.mod.nameAuxiliary.addName(this.mod.itemAtoms, ChemiCraftCore.ATOMSNAME); this.mod.nameAuxiliary.addName(this.mod.itemAtoms, "ja_JP", ChemiCraftCore.ATOMSNAMEJP); this.mod.nameAuxiliary.addName(this.mod.itemGasCollectingBottle, "GasCollectingBottle"); this.mod.nameAuxiliary.addName(this.mod.itemGasCollectingBottle, "ja_JP", "集気瓶"); this.mod.nameAuxiliary.addName(this.mod.itemChemicalCells, "ChemicalCell"); this.mod.nameAuxiliary.addName(this.mod.itemChemicalCells, "ja_JP", "化学電池"); + this.mod.api.addElectrolysisDecompositionFuel(new ItemStack(this.mod.itemChemicalCells), 1000); this.mod.nameAuxiliary.addName(this.mod.itemPear, "Pear"); this.mod.nameAuxiliary.addName(this.mod.itemPear, "ja_JP", "梨");