Fix Broken Sockets

This commit is contained in:
Nedelosk committed 2017-12-17 16:07:12 +01:00
1 parent aac4d730d6
commit b3be6a8f02
1 file changed
+2 -2
@@ -85,13 +85,13 @@ public class ContainerSocketedHelper<T extends TileEntity & ISocketable> impleme
return;
}
InventoryUtil.stowInInventory(socket, player.inventory, true);
// Not sufficient space in player's inventory. failed to stow.
if (!socket.isEmpty()) {
if (!InventoryUtil.stowInInventory(socket, player.inventory, false)) {
return;
}
tile.setSocket(slot, ItemStack.EMPTY);
InventoryUtil.stowInInventory(socket, player.inventory, true);
itemstack.damageItem(1, player);
player.updateHeldItem();