summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/item/ItemRing.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-16 16:34:17 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-16 16:34:17 +0200
commit26d28c9b93133a6cfc5d2544c662e9d77955b6f5 (patch)
treeba4a4cb9829a14db82e67af26e2e21fc59571ead /common/darkknight/jewelrycraft/item/ItemRing.java
parent1f718427162fa59a22c08a32e68e133fb411aa37 (diff)
Rings and molder
Diffstat (limited to 'common/darkknight/jewelrycraft/item/ItemRing.java')
-rw-r--r--common/darkknight/jewelrycraft/item/ItemRing.java46
1 files changed, 46 insertions, 0 deletions
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());
+ }
+}