package squeek.veganoption.items;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import squeek.veganoption.entities.EntityBubble;

public class ItemSoapSolution extends Item
{
	public ItemSoapSolution()
	{
		super();
		setMaxStackSize(1);
		setMaxDamage(16);
	}

	@Override
	public EnumAction getItemUseAction(ItemStack itemStack)
	{
		return EnumAction.drink;
	}

	@Override
	public int getMaxItemUseDuration(ItemStack itemStack)
	{
		return 16;
	}

	@Override
	public ItemStack onEaten(ItemStack itemStack, World world, EntityPlayer player)
	{
		if (!world.isRemote)
		{
			world.spawnEntityInWorld(new EntityBubble(world, player));
		}

		itemStack.damageItem(1, player);

		if (itemStack.getItemDamage() == itemStack.getMaxDamage() && getContainerItem() != null)
		{
			return new ItemStack(getContainerItem());
		}

		return super.onEaten(itemStack, world, player);
	}

	@Override
	public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
	{
		player.setItemInUse(itemStack, getMaxItemUseDuration(itemStack));
		return super.onItemRightClick(itemStack, world, player);
	}
}

@@ -396,11 +396,22 @@
 ge(1
-6
+5
 );
+ // 16 uses
 %0A%09%7D%0A
@@ -844,51 +844,22 @@
 ack.
-getItemDamage() == itemStack.getMaxDamage()
+stackSize == 0
  && 

Make soap solution conform to the vanilla damage/durability scheme