summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/block/BlockMolder.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-16 20:27:39 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-16 20:27:39 +0200
commit611c030450614adcb87d5e2af784712e504eeae4 (patch)
tree9c1193f6012c8d9182ff9029a61d32ef433ad9a6 /common/darkknight/jewelrycraft/block/BlockMolder.java
parentd548c65cf67e9f9605093eade74bef62028b7cf6 (diff)
Ring ring ring
Diffstat (limited to 'common/darkknight/jewelrycraft/block/BlockMolder.java')
-rw-r--r--common/darkknight/jewelrycraft/block/BlockMolder.java12
1 files changed, 5 insertions, 7 deletions
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);
}
}