// Path: src/api/java/com/github/atomicblom/shearmadness/api/capability/IChiseledSheepCapability.java
// public interface IChiseledSheepCapability
// {
//     boolean isChiseled();
// 
//     void unChisel();
// 
//     void chisel(ItemStack itemStack);
// 
//     ItemStack getChiselItemStack();
// 
//     int getItemIdentifier();
// 
//     NBTTagCompound getExtraData();
// }
// 
// Path: src/main/java/com/github/atomicblom/shearmadness/utility/ItemStackUtils.java
// @SuppressWarnings("UtilityClass")
// public final class ItemStackUtils
// {
//     private ItemStackUtils() {}
// 
//     public static void dropItem(Entity nearEntity, ItemStack itemStack)
//     {
//         final EntityItem item = nearEntity.entityDropItem(itemStack, 1.0F);
//         final Random rand = new Random();
//         item.motionY += rand.nextFloat() * 0.05F;
//         item.motionX += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
//         item.motionZ += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
//     }
// 
//     private static final PooledByteBufAllocator allocator = new PooledByteBufAllocator(false);
// 
//     public static int getHash(ItemStack itemStack)
//     {
//         final ByteBuf buffer = allocator.heapBuffer();
//         final PacketBuffer packetBuffer = new PacketBuffer(buffer);
//         packetBuffer.writeItemStackToBuffer(itemStack);
//         final int i = Arrays.hashCode(packetBuffer.array());
//         packetBuffer.release();
//         return i;
//     }
// }


import com.github.atomicblom.shearmadness.api.capability.IChiseledSheepCapability;
import com.github.atomicblom.shearmadness.utility.ItemStackUtils;
import com.google.common.base.Objects;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
package com.github.atomicblom.shearmadness.capability;



public class ChiseledSheepCapability implements IChiseledSheepCapability, IWriteExtraData
{
    @Nullable
    private ItemStack itemStack = null;
    private int itemIdentifier;
    private NBTTagCompound customData = null;

    @Override
    public boolean isChiseled()
    {
        return itemStack != null;
    }

    @Override
    public void chisel(@Nonnull ItemStack itemStack)
    {
        this.itemStack = itemStack;
// Path: src/api/java/com/github/atomicblom/shearmadness/api/capability/IChiseledSheepCapability.java
// public interface IChiseledSheepCapability
// {
//     boolean isChiseled();
// 
//     void unChisel();
// 
//     void chisel(ItemStack itemStack);
// 
//     ItemStack getChiselItemStack();
// 
//     int getItemIdentifier();
// 
//     NBTTagCompound getExtraData();
// }
// 
// Path: src/main/java/com/github/atomicblom/shearmadness/utility/ItemStackUtils.java
// @SuppressWarnings("UtilityClass")
// public final class ItemStackUtils
// {
//     private ItemStackUtils() {}
// 
//     public static void dropItem(Entity nearEntity, ItemStack itemStack)
//     {
//         final EntityItem item = nearEntity.entityDropItem(itemStack, 1.0F);
//         final Random rand = new Random();
//         item.motionY += rand.nextFloat() * 0.05F;
//         item.motionX += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
//         item.motionZ += (rand.nextFloat() - rand.nextFloat()) * 0.1F;
//     }
// 
//     private static final PooledByteBufAllocator allocator = new PooledByteBufAllocator(false);
// 
//     public static int getHash(ItemStack itemStack)
//     {
//         final ByteBuf buffer = allocator.heapBuffer();
//         final PacketBuffer packetBuffer = new PacketBuffer(buffer);
//         packetBuffer.writeItemStackToBuffer(itemStack);
//         final int i = Arrays.hashCode(packetBuffer.array());
//         packetBuffer.release();
//         return i;
//     }
// }


// Path: src/main/java/com/github/atomicblom/shearmadness/capability/ChiseledSheepCapability.java
import com.github.atomicblom.shearmadness.api.capability.IChiseledSheepCapability;
import com.github.atomicblom.shearmadness.utility.ItemStackUtils;
import com.google.common.base.Objects;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

package com.github.atomicblom.shearmadness.capability;



public class ChiseledSheepCapability implements IChiseledSheepCapability, IWriteExtraData
{
    @Nullable
    private ItemStack itemStack = null;
    private int itemIdentifier;
    private NBTTagCompound customData = null;

    @Override
    public boolean isChiseled()
    {
        return itemStack != null;
    }

    @Override
    public void chisel(@Nonnull ItemStack itemStack)
    {
        this.itemStack = itemStack;
        itemIdentifier = ItemStackUtils.getHash(itemStack);