diff options
Diffstat (limited to 'common/darkknight/jewelrycraft/block/BlockDisplayer.java')
| -rw-r--r-- | common/darkknight/jewelrycraft/block/BlockDisplayer.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/darkknight/jewelrycraft/block/BlockDisplayer.java b/common/darkknight/jewelrycraft/block/BlockDisplayer.java index e0061ae..d83186a 100644 --- a/common/darkknight/jewelrycraft/block/BlockDisplayer.java +++ b/common/darkknight/jewelrycraft/block/BlockDisplayer.java @@ -13,6 +13,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraftforge.common.FakePlayer; import darkknight.jewelrycraft.tileentity.TileEntityDisplayer; public class BlockDisplayer extends BlockContainer @@ -59,7 +60,7 @@ public class BlockDisplayer extends BlockContainer { TileEntityDisplayer te = (TileEntityDisplayer) world.getBlockTileEntity(i, j, k); ItemStack item = entityPlayer.inventory.getCurrentItem(); - if (te != null && item != null && item != new ItemStack(0, 0, 0) && !world.isRemote) + if (te != null && item != null && item != new ItemStack(0, 0, 0) && world.isRemote) { if(!te.hasObject) { @@ -70,7 +71,7 @@ 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.getTooltip(entityPlayer, false).equals(item.getTooltip(entityPlayer, false))) + else if(te.object.itemID == item.itemID && te.object.getItemDamage() == item.getItemDamage() && te.object.getTooltip(new FakePlayer(te.worldObj, "Player"), true).equals(item.getTooltip(new FakePlayer(te.worldObj, "Player"), true))) { te.quantity += item.stackSize; te.object.stackSize = 1; |
