diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2013-12-27 01:03:03 +0200 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2013-12-27 01:03:03 +0200 |
| commit | 4d001997b81489da4bca149e6ba47e7ef08dc4b9 (patch) | |
| tree | b97a8e9d851834ed56dcb50561229c0b82db4a72 /common/darkknight/jewelrycraft/block/BlockDisplayer.java | |
| parent | 5991f25a58006bcae70b3a9d49fd0c70706e2de7 (diff) | |
Fixed and made so you can't teleport in another dimension the coords were set in
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; |
