OSDN Git Service

修正・変更
[chemicraft/ChemiCraftNext.git] / common / pcc / chemicraft / core / ChemiCraftRegisterItem.java
index 55fdb35..1863941 100644 (file)
@@ -1,13 +1,18 @@
 package pcc.chemicraft.core;
 
 import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemFood;
 import net.minecraft.item.ItemStack;
+import pcc.chemicraft.ChemiCraft;
 import pcc.chemicraft.core.item.ItemAtoms;
-import pcc.chemicraft.core.item.ItemChemiCell;
+import pcc.chemicraft.core.item.ItemChemicalCell;
 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,22 +21,18 @@ 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);
-               this.mod.itemPear = new OldItemFood(this.mod.pearID, 4, 0.4F, false){
+               //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 ItemChemicalCell(this.mod.chemicalCellsID).setUnlocalizedName("chemicalCell");
+               this.mod.itemPear = new ItemFood(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(ChemiCraft.TEXTURE + "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");