diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2013-12-27 01:36:51 +0200 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2013-12-27 01:36:51 +0200 |
| commit | 9c2394a787768b068a141ba7a473b9f023d27a38 (patch) | |
| tree | deff775cd3da9b1638cc1ab9c41baa33c2af37f3 /common | |
| parent | 1621733a8879026be1f1cfc7987f2c59d5795e24 (diff) | |
Fix
Diffstat (limited to 'common')
| -rw-r--r-- | common/darkknight/jewelrycraft/block/BlockDisplayer.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/common/darkknight/jewelrycraft/block/BlockDisplayer.java b/common/darkknight/jewelrycraft/block/BlockDisplayer.java index 95eb039..766aad1 100644 --- a/common/darkknight/jewelrycraft/block/BlockDisplayer.java +++ b/common/darkknight/jewelrycraft/block/BlockDisplayer.java @@ -71,12 +71,22 @@ public class BlockDisplayer extends BlockContainer if (!entityPlayer.capabilities.isCreativeMode) item.stackSize = 0; te.isDirty = true; } - else if(te.object.itemID == item.itemID && te.object.getItemDamage() == item.getItemDamage() && te.object.getTagCompound().equals(item.getTagCompound())) + else if(te.object.itemID == item.itemID && te.object != null && te.object != new ItemStack(0, 0, 0) && te.object.getItemDamage() == item.getItemDamage()) { - te.quantity += item.stackSize; - te.object.stackSize = 1; - if (!entityPlayer.capabilities.isCreativeMode) item.stackSize = 0; - te.isDirty = true; + if(te.object.hasTagCompound() && item.hasTagCompound() && te.object.getTagCompound().equals(item.getTagCompound())) + { + te.quantity += item.stackSize; + te.object.stackSize = 1; + if (!entityPlayer.capabilities.isCreativeMode) item.stackSize = 0; + te.isDirty = true; + } + else if(!te.object.hasTagCompound() && !item.hasTagCompound()) + { + te.quantity += item.stackSize; + te.object.stackSize = 1; + if (!entityPlayer.capabilities.isCreativeMode) item.stackSize = 0; + te.isDirty = true; + } } } return true; |
