summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/block/BlockMolder.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-16 18:00:50 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-16 18:00:50 +0200
commit5ccd234e08724dfb90e5ad416771d87f591bc4fe (patch)
tree163694d8d21743826a4b383e4d6ef0120a27ec73 /common/darkknight/jewelrycraft/block/BlockMolder.java
parenta790a85e5dd59fd4e320c5445a655c503de6c702 (diff)
stuff with rings and stuff
Diffstat (limited to 'common/darkknight/jewelrycraft/block/BlockMolder.java')
-rw-r--r--common/darkknight/jewelrycraft/block/BlockMolder.java24
1 files changed, 7 insertions, 17 deletions
diff --git a/common/darkknight/jewelrycraft/block/BlockMolder.java b/common/darkknight/jewelrycraft/block/BlockMolder.java
index b5b8368..6ccaee5 100644
--- a/common/darkknight/jewelrycraft/block/BlockMolder.java
+++ b/common/darkknight/jewelrycraft/block/BlockMolder.java
@@ -42,10 +42,7 @@ public class BlockMolder extends BlockContainer
@Override
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityPlayer, int par6, float par7, float par8, float par9)
- {
- if (world.isRemote)
- return true;
-
+ {
TileEntityMolder te = (TileEntityMolder) world.getBlockTileEntity(i, j, k);
ItemStack item = entityPlayer.inventory.getCurrentItem();
if (te != null && item != null && !te.hasMold && item.itemID == ItemList.molds.itemID)
@@ -66,8 +63,6 @@ public class BlockMolder extends BlockContainer
@Override
public void onBlockDestroyedByPlayer(World world, int i, int j, int k, int par5)
{
- if (world.isRemote)
- return;
TileEntityMolder te = (TileEntityMolder) world.getBlockTileEntity(i, j, k);
if (te != null)
@@ -110,10 +105,7 @@ public class BlockMolder extends BlockContainer
@Override
public void onBlockDestroyedByExplosion(World world, int i, int j, int k, Explosion par5Explosion)
- {
- if (world.isRemote)
- return;
-
+ {
onBlockDestroyedByPlayer(world, i, j, k, 0);
}
@@ -121,21 +113,19 @@ public class BlockMolder extends BlockContainer
{
if (item != null)
{
+ ItemStack copy = null;
if (item.itemID == ItemList.ring.itemID && metal != null)
{
- Item r = new ItemRing(ItemList.ring.itemID, metal);
- item = new ItemStack(r);
+ Item r = new ItemRing(ItemList.ring.itemID, metal).setUnlocalizedName("jewelrycraft.ring");
+ copy = new ItemStack(r);
}
- player.inventory.addItemStackToInventory(item);
+ player.inventory.addItemStackToInventory(copy);
}
}
@Override
public void onBlockClicked(World world, int i, int j, int k, EntityPlayer player)
- {
- if (world.isRemote)
- return;
-
+ {
TileEntityMolder me = (TileEntityMolder) world.getBlockTileEntity(i, j, k);
if (me != null && me.hasJewelBase)
{