From 611c030450614adcb87d5e2af784712e504eeae4 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Mon, 16 Dec 2013 20:27:39 +0200 Subject: Ring ring ring --- common/darkknight/jewelrycraft/block/BlockMolder.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'common/darkknight/jewelrycraft/block/BlockMolder.java') diff --git a/common/darkknight/jewelrycraft/block/BlockMolder.java b/common/darkknight/jewelrycraft/block/BlockMolder.java index 521698a..0003015 100644 --- a/common/darkknight/jewelrycraft/block/BlockMolder.java +++ b/common/darkknight/jewelrycraft/block/BlockMolder.java @@ -5,9 +5,10 @@ import java.util.Random; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentData; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -108,18 +109,15 @@ public class BlockMolder extends BlockContainer onBlockDestroyedByPlayer(world, i, j, k, 0); } - public void giveJewelToPlayer(TileEntityMolder md, EntityPlayer player, ItemStack item, ItemStack metal) + public void giveJewelToPlayer(TileEntityMolder md, EntityPlayer player, ItemStack item, String metal) { if (item != null) { - ItemStack copy = null; if (item.itemID == ItemList.ring.itemID && metal != null) { - Item r = new ItemRing(ItemList.ring.itemID, metal).setUnlocalizedName("jewelrycraft.ring"); - copy = new ItemStack(r); + ItemRing.addMetal(item, metal); } - else copy = item; - player.inventory.addItemStackToInventory(copy); + player.inventory.addItemStackToInventory(item); } } -- cgit v1.2.3