boolean activateDryingRack (World world, int x, int y, int z, EntityPlayer player)
{
if (!world.isRemote)
{
DryingRackLogic logic = (DryingRackLogic) world.getTileEntity(x, y, z);
if (!logic.isStackInSlot(0))
{
ItemStack stack = player.getCurrentEquippedItem();
if (stack != null)
{
stack = player.inventory.decrStackSize(player.inventory.currentItem, 1);
logic.setInventorySlotContents(0, stack);
}
}
else
{
if (logic.isStackInSlot(0))
{
ItemStack decrStack = logic.decrStackSize(0, 1);
if (decrStack != null)
addItemToInventory(player, world, x, y, z, decrStack);
}
}