Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed #420
  • Loading branch information
DisasterMoo committed Sep 13, 2019
1 parent 0677989 commit 37ff0e2
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -108,7 +108,12 @@ public void onContainerClosed(EntityPlayer player)
ItemStack stack = slot.getStack();
if (!stack.isEmpty())
{
player.addItemStackToInventory(stack);
if (!player.world.isRemote)
{
// Player#addItemStackToInventory(stack) returned true even when inventory was full
// Since the item is immediately picked up when possible, this works like we want
Helpers.spawnItemStack(player.world, player.getPosition(), stack);
}
}
super.onContainerClosed(player);
}
Expand Down

0 comments on commit 37ff0e2

Please sign in to comment.