// Path: src/api/java/com/github/atomicblom/shearmadness/api/Capability.java
// public final class Capability {
//     @CapabilityInject(IChiseledSheepCapability.class)
//     public static final net.minecraftforge.common.capabilities.Capability<IChiseledSheepCapability> CHISELED_SHEEP;
// 
//     static {
//         CHISELED_SHEEP = null;
//     }
// }
// 
// Path: src/api/java/com/github/atomicblom/shearmadness/api/behaviour/BehaviourBase.java
// @SuppressWarnings({"NoopMethodInAbstractClass", "ClassHasNoToStringMethod", "WeakerAccess"})
// public abstract class BehaviourBase<T extends BehaviourBase> {
//     private final EntitySheep entity;
//     private final Supplier<Boolean> configuration;
// 
//     protected BehaviourBase(EntitySheep sheep) {
//         this(sheep, () -> true);
//     }
// 
//     protected BehaviourBase(EntitySheep entity, Supplier<Boolean> configuration)
//     {
//         this.entity = entity;
//         this.configuration = configuration;
//     }
// 
//     public boolean isBehaviourEnabled() {
//         return configuration.get();
//     }
// 
//     public void onSheepMovedBlock(BlockPos previousLocation, BlockPos newLocation) {}
// 
//     public void onBehaviourStarted(BlockPos currentPos) {}
// 
//     public void onBehaviourStopped(BlockPos previousPos) {}
// 
//     public void updateTask() {}
// 
//     public boolean isEquivalentTo(T other) {
//         return entity.getUniqueID().equals(other.getEntity().getUniqueID());
//     }
// 
//     public EntitySheep getEntity()
//     {
//         return entity;
//     }
// }
// 
// 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/Logger.java
// public enum Logger
// {
//     INSTANCE;
// 
//     @SuppressWarnings({"NonSerializableFieldInSerializableClass", "InstanceVariableMayNotBeInitialized"})
//     private org.apache.logging.log4j.Logger logger;
// 
//     public static void info(final String format, final Object... args)
//     {
//         INSTANCE.log(Level.INFO, format, args);
//     }
// 
//     public static void log(final Level level, final Throwable exception, final String format, final Object... args)
//     {
//         //noinspection ChainedMethodCall
//         INSTANCE.getLogger().log(level, String.format(format, args), exception);
//     }
// 
//     public static void severe(final String format, final Object... args)
//     {
//         INSTANCE.log(Level.ERROR, format, args);
//     }
// 
//     public static void warning(final String format, final Object... args)
//     {
//         INSTANCE.log(Level.WARN, format, args);
//     }
// 
//     public static void trace(final String format, final Object... args)
//     {
//         INSTANCE.log(Level.TRACE, format, args);
//     }
// 
//     private org.apache.logging.log4j.Logger getLogger()
//     {
//         if (logger == null)
//         {
//             init();
//         }
// 
//         return logger;
//     }
// 
//     private void init()
//     {
//         if (logger == null)
//         {
//             logger = LogManager.getLogger(CommonReference.MOD_ID);
//         }
//     }
// 
//     private void log(final Level level, final String format, final Object... data)
//     {
//         //noinspection ChainedMethodCall
//         getLogger().log(level, String.format(format, data));
//     }
// }


import com.github.atomicblom.shearmadness.api.Capability;
import com.github.atomicblom.shearmadness.api.behaviour.BehaviourBase;
import com.github.atomicblom.shearmadness.api.capability.IChiseledSheepCapability;
import com.github.atomicblom.shearmadness.utility.Logger;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.passive.EntitySheep;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ContainerWorkbench;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import javax.annotation.Nullable;
import java.util.List;
        }
        final NBTTagCompound extraData = entity.getCapability(Capability.CHISELED_SHEEP, null).getExtraData();
        extraData.removeTag("AUTO_CRAFT");
    }

    private void consumeItem(World worldObj) {
        if (targetedItem != null && targetedItem.isEntityAlive()) {
            final ItemStack entityItem = targetedItem.getEntityItem();
            while (entityItem.stackSize > 0 && consumeItem(entityItem)) {
                entityItem.stackSize--;
            }

            if (entityItem.stackSize == 0) {
                worldObj.removeEntity(targetedItem);
            }

            Logger.trace("Add item to consumed");
            updateItemsConsumed();

            checkDigested();
        }
    }

    private void checkDigested() {
        int itemsLeft = checkItemsLeftToConsume();

        if (itemsLeft == 0) {
            poopingItemTimer = 44;
            Logger.trace("Digesting Item");
        } else {
// Path: src/api/java/com/github/atomicblom/shearmadness/api/Capability.java
// public final class Capability {
//     @CapabilityInject(IChiseledSheepCapability.class)
//     public static final net.minecraftforge.common.capabilities.Capability<IChiseledSheepCapability> CHISELED_SHEEP;
// 
//     static {
//         CHISELED_SHEEP = null;
//     }
// }
// 
// Path: src/api/java/com/github/atomicblom/shearmadness/api/behaviour/BehaviourBase.java
// @SuppressWarnings({"NoopMethodInAbstractClass", "ClassHasNoToStringMethod", "WeakerAccess"})
// public abstract class BehaviourBase<T extends BehaviourBase> {
//     private final EntitySheep entity;
//     private final Supplier<Boolean> configuration;
// 
//     protected BehaviourBase(EntitySheep sheep) {
//         this(sheep, () -> true);
//     }
// 
//     protected BehaviourBase(EntitySheep entity, Supplier<Boolean> configuration)
//     {
//         this.entity = entity;
//         this.configuration = configuration;
//     }
// 
//     public boolean isBehaviourEnabled() {
//         return configuration.get();
//     }
// 
//     public void onSheepMovedBlock(BlockPos previousLocation, BlockPos newLocation) {}
// 
//     public void onBehaviourStarted(BlockPos currentPos) {}
// 
//     public void onBehaviourStopped(BlockPos previousPos) {}
// 
//     public void updateTask() {}
// 
//     public boolean isEquivalentTo(T other) {
//         return entity.getUniqueID().equals(other.getEntity().getUniqueID());
//     }
// 
//     public EntitySheep getEntity()
//     {
//         return entity;
//     }
// }
// 
// 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/Logger.java
// public enum Logger
// {
//     INSTANCE;
// 
//     @SuppressWarnings({"NonSerializableFieldInSerializableClass", "InstanceVariableMayNotBeInitialized"})
//     private org.apache.logging.log4j.Logger logger;
// 
//     public static void info(final String format, final Object... args)
//     {
//         INSTANCE.log(Level.INFO, format, args);
//     }
// 
//     public static void log(final Level level, final Throwable exception, final String format, final Object... args)
//     {
//         //noinspection ChainedMethodCall
//         INSTANCE.getLogger().log(level, String.format(format, args), exception);
//     }
// 
//     public static void severe(final String format, final Object... args)
//     {
//         INSTANCE.log(Level.ERROR, format, args);
//     }
// 
//     public static void warning(final String format, final Object... args)
//     {
//         INSTANCE.log(Level.WARN, format, args);
//     }
// 
//     public static void trace(final String format, final Object... args)
//     {
//         INSTANCE.log(Level.TRACE, format, args);
//     }
// 
//     private org.apache.logging.log4j.Logger getLogger()
//     {
//         if (logger == null)
//         {
//             init();
//         }
// 
//         return logger;
//     }
// 
//     private void init()
//     {
//         if (logger == null)
//         {
//             logger = LogManager.getLogger(CommonReference.MOD_ID);
//         }
//     }
// 
//     private void log(final Level level, final String format, final Object... data)
//     {
//         //noinspection ChainedMethodCall
//         getLogger().log(level, String.format(format, data));
//     }
// }


// Path: src/integration/java/com/github/atomicblom/shearmadness/variations/vanilla/behaviour/FollowAutoCraftItems.java
import com.github.atomicblom.shearmadness.api.Capability;
import com.github.atomicblom.shearmadness.api.behaviour.BehaviourBase;
import com.github.atomicblom.shearmadness.api.capability.IChiseledSheepCapability;
import com.github.atomicblom.shearmadness.utility.Logger;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.passive.EntitySheep;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ContainerWorkbench;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import javax.annotation.Nullable;
import java.util.List;

        }
        final NBTTagCompound extraData = entity.getCapability(Capability.CHISELED_SHEEP, null).getExtraData();
        extraData.removeTag("AUTO_CRAFT");
    }

    private void consumeItem(World worldObj) {
        if (targetedItem != null && targetedItem.isEntityAlive()) {
            final ItemStack entityItem = targetedItem.getEntityItem();
            while (entityItem.stackSize > 0 && consumeItem(entityItem)) {
                entityItem.stackSize--;
            }

            if (entityItem.stackSize == 0) {
                worldObj.removeEntity(targetedItem);
            }

            Logger.trace("Add item to consumed");
            updateItemsConsumed();

            checkDigested();
        }
    }

    private void checkDigested() {
        int itemsLeft = checkItemsLeftToConsume();

        if (itemsLeft == 0) {
            poopingItemTimer = 44;
            Logger.trace("Digesting Item");
        } else {
            Logger.trace("%d items left", itemsLeft);