mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-18 19:39:12 +00:00
Port the weird possible casting-block-dupe fix over to the drying rack #1190
This commit is contained in:
1 parent
9af43cbe9e
commit
6d677dcc7a
2 files changed
+9
-8
No files matched your search
@@ -96,12 +96,9 @@ public class DryingRack extends InventoryBlock
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logic.isStackInSlot(0))
|
||||
{
|
||||
ItemStack decrStack = logic.decrStackSize(0, 1);
|
||||
if (decrStack != null)
|
||||
addItemToInventory(player, world, x, y, z, decrStack);
|
||||
}
|
||||
ItemStack decrStack = logic.decrStackSize(0, 1);
|
||||
if (decrStack != null)
|
||||
addItemToInventory(player, world, x, y, z, decrStack);
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
@@ -111,7 +108,11 @@ public class DryingRack extends InventoryBlock
|
||||
|
||||
public void addItemToInventory (EntityPlayer player, World world, int x, int y, int z, ItemStack stack)
|
||||
{
|
||||
AbilityHelper.spawnItemAtPlayer(player, stack);
|
||||
if(!player.inventory.addItemStackToInventory(stack))
|
||||
{
|
||||
// drop the rest as an item
|
||||
AbilityHelper.spawnItemAtPlayer(player, stack);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user