OSDN Git Service

(・∀・)
[chemicraft/chemicraft.git] / common / pcc / chemicraft / base / item / ItemRadiationGun.java
index ffa02ab..8b7d9d1 100644 (file)
@@ -2,6 +2,7 @@ package pcc.chemicraft.base.item;
 
 import java.util.ArrayList;
 
+import net.minecraft.client.renderer.texture.IconRegister;
 import net.minecraft.entity.Entity;
 import net.minecraft.entity.EntityLiving;
 import net.minecraft.entity.player.EntityPlayer;
@@ -31,8 +32,8 @@ public class ItemRadiationGun extends Item {
        }
 
        @Override
-       public String getTextureFile() {
-               return ChemiCraft.ITEM_TEXTURE;
+       public void updateIcons(IconRegister par1IconRegister){
+               this.iconIndex = par1IconRegister.registerIcon(ChemiCraft.TEXTURE + "ItemRadiationGun");
        }
 
        @Override
@@ -44,8 +45,8 @@ public class ItemRadiationGun extends Item {
                if (this.delay <= 0) {
                        if (!isCreative) {
                                this.field_00001(par1ItemStack, par2World, par3EntityPlayer);
-                               if (par3EntityPlayer.inventory.hasItem(ChemiCraftBase.instance.itemRadiationBallet.shiftedIndex)) {
-                                       par3EntityPlayer.inventory.consumeInventoryItem(ChemiCraftBase.instance.itemRadiationBallet.shiftedIndex);
+                               if (par3EntityPlayer.inventory.hasItem(ChemiCraftBase.instance.itemRadiationBallet.itemID)) {
+                                       par3EntityPlayer.inventory.consumeInventoryItem(ChemiCraftBase.instance.itemRadiationBallet.itemID);
                                        par2World.playSound(par3EntityPlayer.posX,
                                                        par3EntityPlayer.posY,
                                                        par3EntityPlayer.posZ,