content: package thebetweenlands.compat.jei.recipes.pam;
  
  import javax.annotation.Nonnull;
  
  import mezz.jei.api.gui.IDrawable;
  import mezz.jei.api.gui.IRecipeLayout;
  import mezz.jei.api.ingredients.IIngredients;
  import mezz.jei.api.ingredients.VanillaTypes;
  import mezz.jei.api.recipe.IRecipeCategory;
  import mezz.jei.api.recipe.IRecipeWrapper;
  import net.minecraft.item.ItemStack;
  import net.minecraft.nbt.NBTTagCompound;
  import net.minecraft.util.ResourceLocation;
  import thebetweenlands.common.lib.ModInfo;
  import thebetweenlands.compat.jei.BetweenlandsJEIPlugin;
  import thebetweenlands.util.TranslationHelper;
  
  public class PestleAndMortarCategory implements IRecipeCategory {
      private final ResourceLocation backgroundLocation = new ResourceLocation(ModInfo.ID + ":textures/gui/manual/pam_grid.png");
      @Nonnull
      protected final IDrawable background = BetweenlandsJEIPlugin.jeiHelper.getGuiHelper().createDrawable(backgroundLocation, 0, 0, 107, 34);
  
      @Override
      public String getUid() {
          return ModInfo.ID + ":pestle_and_mortar";
      }
  
      @Override
      public String getTitle() {
          return TranslationHelper.translateToLocal("jei.thebetweenlands.recipe.pestle_and_mortar");
      }
  
      @Override
      public IDrawable getBackground() {
          return background;
      }
  
      @Override
      public String getModName() {
          return ModInfo.NAME;
      }
  
      @Override
      public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) {
          recipeLayout.getItemStacks().init(0, true, 0, 6);
          recipeLayout.getItemStacks().init(1, true, 44, 6);
          recipeLayout.getItemStacks().init(2, false, 88, 6);
  
          ItemStack pestle = ingredients.getInputs(VanillaTypes.ITEM).get(1).get(0);
          NBTTagCompound compound = new NBTTagCompound();
          compound.setBoolean("active", true);
          pestle.setTagCompound(compound);
          recipeLayout.getItemStacks().set(0, ingredients.getInputs(VanillaTypes.ITEM).get(0));
          recipeLayout.getItemStacks().set(1, pestle);
          recipeLayout.getItemStacks().set(2, ingredients.getOutputs(VanillaTypes.ITEM).get(0));
      }
  }
  