diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2014-04-14 11:58:43 +0300 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2014-04-14 11:58:43 +0300 |
| commit | 1a692ab45df3d88a6cc247cc9f4c0a41c7715264 (patch) | |
| tree | 1854960d78be20ef09c9f098f5e2eb92837019dd /common/darkknight/jewelrycraft/item/ItemClayMolds.java | |
| parent | f965cf88704f1e5e674d98308cbe0f4451d7edeb (diff) | |
Updating to 1.7
Diffstat (limited to 'common/darkknight/jewelrycraft/item/ItemClayMolds.java')
| -rw-r--r-- | common/darkknight/jewelrycraft/item/ItemClayMolds.java | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/common/darkknight/jewelrycraft/item/ItemClayMolds.java b/common/darkknight/jewelrycraft/item/ItemClayMolds.java deleted file mode 100644 index 05a684c..0000000 --- a/common/darkknight/jewelrycraft/item/ItemClayMolds.java +++ /dev/null @@ -1,72 +0,0 @@ -package darkknight.jewelrycraft.item; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.List; - -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; -import net.minecraft.util.MathHelper; - -public class ItemClayMolds extends Item -{ - /** List of molds color names */ - public static final String[] moldsItemNames = new String[] { "clayIngot", "clayRing", "clayNecklace" }; - @SideOnly(Side.CLIENT) - private Icon[] moldsIcons; - - public ItemClayMolds(int par1) - { - super(par1); - this.setHasSubtypes(true); - this.setMaxDamage(0); - this.setMaxStackSize(1); - } - - @SideOnly(Side.CLIENT) - /** - * Gets an icon index based on an item's damage value - */ - public Icon getIconFromDamage(int par1) - { - int j = MathHelper.clamp_int(par1, 0, moldsItemNames.length - 1); - return this.moldsIcons[j]; - } - - /** - * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have different names based on - * their damage or NBT. - */ - public String getUnlocalizedName(ItemStack par1ItemStack) - { - int i = MathHelper.clamp_int(par1ItemStack.getItemDamage(), 0, moldsItemNames.length - 1); - return super.getUnlocalizedName() + "." + moldsItemNames[i]; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @SideOnly(Side.CLIENT) - /** - * returns a list of items with the same ID, but different meta (eg: molds returns 16 items) - */ - public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) - { - for (int j = 0; j < moldsItemNames.length; ++j) - { - par3List.add(new ItemStack(par1, 1, j)); - } - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) - { - this.moldsIcons = new Icon[moldsItemNames.length]; - - for (int i = 0; i < moldsItemNames.length; ++i) - { - this.moldsIcons[i] = par1IconRegister.registerIcon("jewelrycraft:" + moldsItemNames[i] + this.getIconString()); - } - } -} |
