Skip to content

Commit

Permalink
Possible dupe bug fix: Put items from basins/tables into the inventor…
Browse files Browse the repository at this point in the history
…y instead of dropping them.
  • Loading branch information
bonii-xx committed Sep 15, 2014
1 parent a4aa66b commit a1e2a29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
10 changes: 4 additions & 6 deletions src/main/java/tconstruct/smeltery/blocks/SearedBlock.java
Expand Up @@ -97,12 +97,10 @@ else if (md == 1)

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

Expand Down
Expand Up @@ -276,8 +276,8 @@ public FluidStack drain (int maxDrain, boolean doDrain)
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!
Expand Down Expand Up @@ -310,8 +310,6 @@ public void interact(EntityPlayer player)
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))
Expand All @@ -322,8 +320,6 @@ public void interact(EntityPlayer player)
// 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;
Expand Down

0 comments on commit a1e2a29

Please sign in to comment.