summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/block/BlockMolder.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-17 23:52:19 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-17 23:52:19 +0200
commit38ac6454b2c88432f1da9474fcceafb9d8ab5e3b (patch)
treec3aabab0d8d375b7b497df171445e6eef611db7d /common/darkknight/jewelrycraft/block/BlockMolder.java
parent84dd93f4aac7d3abf1abcec335cd7c3761dd186c (diff)
Sync stuff :)
Diffstat (limited to 'common/darkknight/jewelrycraft/block/BlockMolder.java')
-rw-r--r--common/darkknight/jewelrycraft/block/BlockMolder.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/darkknight/jewelrycraft/block/BlockMolder.java b/common/darkknight/jewelrycraft/block/BlockMolder.java
index 5d1f30d..a3df95f 100644
--- a/common/darkknight/jewelrycraft/block/BlockMolder.java
+++ b/common/darkknight/jewelrycraft/block/BlockMolder.java
@@ -45,19 +45,21 @@ public class BlockMolder extends BlockContainer
{
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)
+ if (te != null && item != null && !te.hasMold && item.itemID == ItemList.molds.itemID && !world.isRemote)
{
te.mold = item;
te.hasMold = true;
--item.stackSize;
if (world.isRemote)
entityPlayer.addChatMessage(StatCollector.translateToLocalFormatted("chatmessage.jewelrycraft.molder.addedmold", te.mold.getDisplayName()));
+ te.isDirty = true;
}
- if (te.hasMold && entityPlayer.isSneaking())
+ if (te.hasMold && entityPlayer.isSneaking() && !world.isRemote)
{
entityPlayer.inventory.addItemStackToInventory(new ItemStack(te.mold.itemID, 1, te.mold.getItemDamage()));
te.mold = new ItemStack(0, 0, 0);
te.hasMold = false;
+ te.isDirty = true;
}
return true;
}
@@ -140,6 +142,7 @@ public class BlockMolder extends BlockContainer
player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.molder.moldisempty"));
else if (me.mold.itemID != ItemList.molds.itemID)
player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.molder.moldismissing"));
+ me.isDirty = true;
}
}