Regitered items-Removed useless one
This commit is contained in:
parent
29228e18fe
commit
6197b7eca1
8 changed files with 36 additions and 96 deletions
|
|
@ -28,7 +28,6 @@ public class ItemBushFruit extends ItemFood {
|
|||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
maxStackSize = 64;
|
||||
setAlwaysEdible();
|
||||
setUnlocalizedName("bushFruit");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ public class ItemImbuedShard extends Item {
|
|||
public ItemImbuedShard() {
|
||||
super();
|
||||
this.setHasSubtypes(true);
|
||||
this.setUnlocalizedName(Strings.IMBUED_SHARD_NAME);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
package mysticworld.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemStaffPower extends Item {
|
||||
private IIcon[] icons;
|
||||
private static final String[] CHARGE_NAMES = new String[] { "Fire", "Water", "Earth", "Air", "Energy" };
|
||||
|
||||
public ItemStaffPower() {
|
||||
super();
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(null);
|
||||
maxStackSize = 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
int j = MathHelper.clamp_int(meta, 0, 5);
|
||||
return icons[j];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, 5);
|
||||
return super.getUnlocalizedName() + CHARGE_NAMES[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icons = new IIcon[CHARGE_NAMES.length];
|
||||
for (int i = 0; i < CHARGE_NAMES.length; ++i) {
|
||||
icons[i] = iconRegister.registerIcon("mysticworld:Charge" + CHARGE_NAMES[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue