// 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;
                Logger.trace("Consuming Item");
                consumeItem(worldObj);
            }

            return;
        }

        final BlockPos position = entity.getPosition();
        if (poopingItemTimer > 0) {
            entity.getNavigator().clearPathEntity();
            poopingItemTimer = Math.max(0, poopingItemTimer - 1);

            if (poopingItemTimer == 1) {
                //calculate recipe and fire item out bum.
                Logger.trace("Crafting Item");
                createItem(entity, worldObj);
                lastExecutionTime = worldObj.getTotalWorldTime();
            }

            return;
        }

        if (lastExecutionTime + 20 < worldObj.getTotalWorldTime()) {
            lastExecutionTime = worldObj.getTotalWorldTime();
            if (findItemToConsume(entity, worldObj, position)) return;
            Logger.trace("No items found");
        }
    }

    private boolean findItemToConsume(EntitySheep entity, World worldObj, BlockPos position) {
// 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;

                Logger.trace("Consuming Item");
                consumeItem(worldObj);
            }

            return;
        }

        final BlockPos position = entity.getPosition();
        if (poopingItemTimer > 0) {
            entity.getNavigator().clearPathEntity();
            poopingItemTimer = Math.max(0, poopingItemTimer - 1);

            if (poopingItemTimer == 1) {
                //calculate recipe and fire item out bum.
                Logger.trace("Crafting Item");
                createItem(entity, worldObj);
                lastExecutionTime = worldObj.getTotalWorldTime();
            }

            return;
        }

        if (lastExecutionTime + 20 < worldObj.getTotalWorldTime()) {
            lastExecutionTime = worldObj.getTotalWorldTime();
            if (findItemToConsume(entity, worldObj, position)) return;
            Logger.trace("No items found");
        }
    }

    private boolean findItemToConsume(EntitySheep entity, World worldObj, BlockPos position) {
        final IChiseledSheepCapability capability = entity.getCapability(Capability.CHISELED_SHEEP, null);