// Path: src/integration/java/com/github/atomicblom/shearmadness/variations/vanilla/container/ContainerWorkbenchSheep.java
// public class ContainerWorkbenchSheep extends ContainerWorkbench
// {
//     private final EntityLiving entity;
//     private final World world;
//     private final IChiseledSheepCapability capability;
// 
//     public ContainerWorkbenchSheep(InventoryPlayer playerInventory, World worldIn, EntityLiving entity)
//     {
//         super(playerInventory, worldIn, entity.getPosition());
//         this.entity = entity;
//         this.world = worldIn;
//         capability = entity.getCapability(Capability.CHISELED_SHEEP, null);
//         onContainerOpened();
//     }
// 
//     @Override
//     public boolean canInteractWith(EntityPlayer playerIn) {
//         if (capability == null) {
//             return false;
//         }
// 
//         if (!ItemStackHelper.isStackForBlock(capability.getChiselItemStack(), Blocks.CRAFTING_TABLE)) {
//             return false;
//         }
// 
//         return playerIn.getDistanceSq(entity.getPosition()) <= 64.0D;
//     }
// 
//     private void onContainerOpened() {
//         if (!world.isRemote) {
//             final NBTTagCompound extraData = capability.getExtraData();
//             final NBTTagCompound craftMatrixNBT = extraData.getCompoundTag("AUTO_CRAFT");
// 
//             for (int i = 0; i < 9; ++i)
//             {
//                 final String key = ((Integer) i).toString();
// 
//                 if (craftMatrixNBT.hasKey(key)) {
//                     final ItemStack itemstack = ItemStack.loadItemStackFromNBT(craftMatrixNBT.getCompoundTag(key));
//                     craftMatrix.setInventorySlotContents(i, itemstack);
//                 }
//             }
// 
//             detectAndSendChanges();
//             onCraftMatrixChanged(craftMatrix);
//         }
//     }
// 
//     /**
//      * Called when the container is closed.
//      */
//     @Override
//     public void onContainerClosed(EntityPlayer playerIn)
//     {
//         if (!world.isRemote)
//         {
//             final NBTTagCompound extraData = capability.getExtraData();
//             final NBTTagCompound craftMatrixNBT = new NBTTagCompound();
// 
//             for (int i = 0; i < 9; ++i)
//             {
//                 final ItemStack itemstack = craftMatrix.removeStackFromSlot(i);
// 
//                 if (itemstack != null)
//                 {
//                     craftMatrixNBT.setTag(((Integer)i).toString(), itemstack.serializeNBT());
//                 }
//             }
// 
//             extraData.setTag("AUTO_CRAFT", craftMatrixNBT);
//             craftMatrixNBT.setLong("lastChanged", this.entity.getEntityWorld().getTotalWorldTime());
//         }
// 
//         super.onContainerClosed(playerIn);
//     }
// }


import com.github.atomicblom.shearmadness.variations.vanilla.container.ContainerWorkbenchSheep;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.Container;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.IInteractionObject;
import net.minecraft.world.World;
package com.github.atomicblom.shearmadness.variations.vanilla.interactions;


public class WorkbenchInteraction implements IInteractionObject
{
    private final World world;
    private final EntityLiving entity;

    public WorkbenchInteraction(World world, EntityLiving entity)
    {
        this.world = world;
        this.entity = entity;
    }

    /**
     * Get the name of this object. For players this returns their username
     */
    @Override
    public String getName()
    {
        return null;
    }

    /**
     * Returns true if this thing is named
     */
    @Override
    public boolean hasCustomName()
    {
        return false;
    }

    /**
     * Get the formatted ChatComponent that will be used for the sender's username in chat
     */
    @Override
    public ITextComponent getDisplayName()
    {
        return new TextComponentTranslation(Blocks.CRAFTING_TABLE.getUnlocalizedName() + ".name");
    }

    @Override
    public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
    {
// Path: src/integration/java/com/github/atomicblom/shearmadness/variations/vanilla/container/ContainerWorkbenchSheep.java
// public class ContainerWorkbenchSheep extends ContainerWorkbench
// {
//     private final EntityLiving entity;
//     private final World world;
//     private final IChiseledSheepCapability capability;
// 
//     public ContainerWorkbenchSheep(InventoryPlayer playerInventory, World worldIn, EntityLiving entity)
//     {
//         super(playerInventory, worldIn, entity.getPosition());
//         this.entity = entity;
//         this.world = worldIn;
//         capability = entity.getCapability(Capability.CHISELED_SHEEP, null);
//         onContainerOpened();
//     }
// 
//     @Override
//     public boolean canInteractWith(EntityPlayer playerIn) {
//         if (capability == null) {
//             return false;
//         }
// 
//         if (!ItemStackHelper.isStackForBlock(capability.getChiselItemStack(), Blocks.CRAFTING_TABLE)) {
//             return false;
//         }
// 
//         return playerIn.getDistanceSq(entity.getPosition()) <= 64.0D;
//     }
// 
//     private void onContainerOpened() {
//         if (!world.isRemote) {
//             final NBTTagCompound extraData = capability.getExtraData();
//             final NBTTagCompound craftMatrixNBT = extraData.getCompoundTag("AUTO_CRAFT");
// 
//             for (int i = 0; i < 9; ++i)
//             {
//                 final String key = ((Integer) i).toString();
// 
//                 if (craftMatrixNBT.hasKey(key)) {
//                     final ItemStack itemstack = ItemStack.loadItemStackFromNBT(craftMatrixNBT.getCompoundTag(key));
//                     craftMatrix.setInventorySlotContents(i, itemstack);
//                 }
//             }
// 
//             detectAndSendChanges();
//             onCraftMatrixChanged(craftMatrix);
//         }
//     }
// 
//     /**
//      * Called when the container is closed.
//      */
//     @Override
//     public void onContainerClosed(EntityPlayer playerIn)
//     {
//         if (!world.isRemote)
//         {
//             final NBTTagCompound extraData = capability.getExtraData();
//             final NBTTagCompound craftMatrixNBT = new NBTTagCompound();
// 
//             for (int i = 0; i < 9; ++i)
//             {
//                 final ItemStack itemstack = craftMatrix.removeStackFromSlot(i);
// 
//                 if (itemstack != null)
//                 {
//                     craftMatrixNBT.setTag(((Integer)i).toString(), itemstack.serializeNBT());
//                 }
//             }
// 
//             extraData.setTag("AUTO_CRAFT", craftMatrixNBT);
//             craftMatrixNBT.setLong("lastChanged", this.entity.getEntityWorld().getTotalWorldTime());
//         }
// 
//         super.onContainerClosed(playerIn);
//     }
// }


// Path: src/integration/java/com/github/atomicblom/shearmadness/variations/vanilla/interactions/WorkbenchInteraction.java
import com.github.atomicblom.shearmadness.variations.vanilla.container.ContainerWorkbenchSheep;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.Container;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.IInteractionObject;
import net.minecraft.world.World;

package com.github.atomicblom.shearmadness.variations.vanilla.interactions;


public class WorkbenchInteraction implements IInteractionObject
{
    private final World world;
    private final EntityLiving entity;

    public WorkbenchInteraction(World world, EntityLiving entity)
    {
        this.world = world;
        this.entity = entity;
    }

    /**
     * Get the name of this object. For players this returns their username
     */
    @Override
    public String getName()
    {
        return null;
    }

    /**
     * Returns true if this thing is named
     */
    @Override
    public boolean hasCustomName()
    {
        return false;
    }

    /**
     * Get the formatted ChatComponent that will be used for the sender's username in chat
     */
    @Override
    public ITextComponent getDisplayName()
    {
        return new TextComponentTranslation(Blocks.CRAFTING_TABLE.getUnlocalizedName() + ".name");
    }

    @Override
    public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
    {
        return new ContainerWorkbenchSheep(playerInventory, world, entity);