From a1e2a292b021d2b07dd0be35b241f23c18755410 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Mon, 15 Sep 2014 12:43:57 +0200 Subject: [PATCH] Possible dupe bug fix: Put items from basins/tables into the inventory instead of dropping them. --- .../java/tconstruct/smeltery/blocks/SearedBlock.java | 10 ++++------ .../tconstruct/smeltery/logic/CastingBlockLogic.java | 8 ++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java b/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java index c037d2ba..ca9f7e95 100644 --- a/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java +++ b/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java @@ -97,12 +97,10 @@ public class SearedBlock extends InventoryBlock boolean activateCastingBlock (World world, int x, int y, int z, EntityPlayer player) { - if (!world.isRemote) - { - CastingBlockLogic logic = (CastingBlockLogic) world.getTileEntity(x, y, z); - logic.interact(player); - world.markBlockForUpdate(x, y, z); - } + + CastingBlockLogic logic = (CastingBlockLogic) world.getTileEntity(x, y, z); + logic.interact(player); + world.markBlockForUpdate(x, y, z); return true; } diff --git a/src/main/java/tconstruct/smeltery/logic/CastingBlockLogic.java b/src/main/java/tconstruct/smeltery/logic/CastingBlockLogic.java index ed9d5d4b..7c803657 100644 --- a/src/main/java/tconstruct/smeltery/logic/CastingBlockLogic.java +++ b/src/main/java/tconstruct/smeltery/logic/CastingBlockLogic.java @@ -276,8 +276,8 @@ public abstract class CastingBlockLogic extends InventoryLogic implements IFluid public void interact(EntityPlayer player) { // only server side - if(worldObj.isRemote) - return; + //if(worldObj.isRemote) + //return; // can't interact with liquid inside // todo: maybe let it interact with a bucket or tank! @@ -310,8 +310,6 @@ public abstract class CastingBlockLogic extends InventoryLogic implements IFluid SmelteryEvent.ItemRemovedFromCasting event = new SmelteryEvent.ItemRemovedFromCasting(this, xCoord, yCoord, zCoord, getStackInSlot(slot), player); MinecraftForge.EVENT_BUS.post(event); - - /* // try to transfer thes tack to the player inventory ItemStack output = event.item; if(!player.inventory.addItemStackToInventory(output)) @@ -322,8 +320,6 @@ public abstract class CastingBlockLogic extends InventoryLogic implements IFluid // added to inventory, update inventory else player.inventory.markDirty(); - */ - AbilityHelper.spawnItemAtPlayer(player, event.item); // remove inventory contents, since we spilled the full contents of the slot inventory[slot] = null;