From 26d28c9b93133a6cfc5d2544c662e9d77955b6f5 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Mon, 16 Dec 2013 16:34:17 +0200 Subject: Rings and molder --- common/darkknight/jewelrycraft/item/ItemRing.java | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 common/darkknight/jewelrycraft/item/ItemRing.java (limited to 'common/darkknight/jewelrycraft/item/ItemRing.java') diff --git a/common/darkknight/jewelrycraft/item/ItemRing.java b/common/darkknight/jewelrycraft/item/ItemRing.java new file mode 100644 index 0000000..155261c --- /dev/null +++ b/common/darkknight/jewelrycraft/item/ItemRing.java @@ -0,0 +1,46 @@ +package darkknight.jewelrycraft.item; + +import java.util.List; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.EnumChatFormatting; + +public class ItemRing extends ItemBase +{ + public ItemStack ingot; + public PotionEffect effect; + + public ItemRing(int par1) + { + super(par1); + this.setMaxStackSize(1); + } + + public ItemRing(int par1, ItemStack ingot) + { + this(par1); + this.ingot = ingot; + } + + public ItemRing(int par1, ItemStack ingot, PotionEffect effect) + { + this(par1, ingot); + this.effect = effect; + } + + public int getColor(ItemStack par1ItemStack) + { + return 65535; + } + + /** + * allows items to add custom lines of information to the mouseover description + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) + { + if(ingot != null) list.add(EnumChatFormatting.GRAY + ingot.getDisplayName()); + if(effect != null) list.add(EnumChatFormatting.GREEN + effect.getEffectName()); + } +} -- cgit v1.2.3