Possible dupe bug fix: Put items from basins/tables into the inventory instead of dropping them.

This commit is contained in:
Bernhard Bonigl committed 2014-09-15 12:43:57 +02:00
1 parent a4aa66b9bc
commit a1e2a292b0
2 files changed
+6 -12

No files matched your search

@@ -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;
}
@@ -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;