Class JeiGenericRecipeCategory<R>

java.lang.Object
com.hbm_m.compat.jei.JeiGenericRecipeCategory<R>
All Implemented Interfaces:
mezz.jei.api.recipe.category.IRecipeCategory<R>
Direct Known Subclasses:
AssemblerJeiCategory, ChemicalPlantJeiCategory

public abstract class JeiGenericRecipeCategory<R> extends Object implements mezz.jei.api.recipe.category.IRecipeCategory<R>
JEI port of NEIGenericRecipeHandler: shared gui_nei.png background and slot layout.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final mezz.jei.api.gui.drawable.IDrawable
     
    protected final mezz.jei.api.helpers.IGuiHelper
     
    protected final mezz.jei.api.gui.drawable.IDrawable
     
    protected final mezz.jei.api.gui.drawable.IDrawable
     
    protected final net.minecraft.world.item.ItemStack[]
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    JeiGenericRecipeCategory(mezz.jei.api.helpers.IGuiHelper guiHelper, net.minecraft.world.item.ItemStack[] machines)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    addBlueprintSlot(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, R recipe, int machineXOffset)
     
    protected abstract void
    addInputSlots(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, R recipe, int inputXOffset)
     
    protected mezz.jei.api.gui.builder.IRecipeSlotBuilder
    addItemSlot(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, mezz.jei.api.recipe.RecipeIngredientRole role, int x, int y)
    NEI draws 18x18 item slot frames at (x - 1, y - 1).
    protected abstract void
    addOutputSlots(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, R recipe, int outputXOffset)
     
    protected mezz.jei.api.gui.builder.IRecipeSlotBuilder
    addUnframedSlot(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, mezz.jei.api.recipe.RecipeIngredientRole role, int x, int y)
    Machine / blueprint icons sit inside the tall NEI machine frame, not in item slot frames.
    void
    draw(R recipe, mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, net.minecraft.client.gui.GuiGraphics guiGraphics, double mouseX, double mouseY)
     
    protected void
    drawRecipeExtras(R recipe, net.minecraft.client.gui.GuiGraphics graphics)
     
    mezz.jei.api.gui.drawable.IDrawable
     
    int
     
    mezz.jei.api.gui.drawable.IDrawable
     
    protected abstract int
    getInputCount(R recipe)
     
    protected int
    getInputXOffset(R recipe, int inputCount)
     
    protected net.minecraft.world.item.ItemStack[]
    getMachines(R recipe)
     
    protected int
     
    protected abstract int
    getOutputCount(R recipe)
     
    protected int
    getOutputXOffset(R recipe, int outputCount)
     
    int
     
    protected abstract boolean
     
    void
    setRecipe(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, R recipe, mezz.jei.api.recipe.IFocusGroup focuses)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface mezz.jei.api.recipe.category.IRecipeCategory

    createRecipeExtras, getRecipeType, getRegistryName, getTitle, getTooltip, getTooltipStrings, handleInput, isHandled, onDisplayedIngredientsUpdate
  • Field Details

    • guiHelper

      protected final mezz.jei.api.helpers.IGuiHelper guiHelper
    • background

      protected final mezz.jei.api.gui.drawable.IDrawable background
    • icon

      protected final mezz.jei.api.gui.drawable.IDrawable icon
    • itemSlotBackground

      protected final mezz.jei.api.gui.drawable.IDrawable itemSlotBackground
    • machines

      protected final net.minecraft.world.item.ItemStack[] machines
  • Constructor Details

    • JeiGenericRecipeCategory

      protected JeiGenericRecipeCategory(mezz.jei.api.helpers.IGuiHelper guiHelper, net.minecraft.world.item.ItemStack[] machines)
  • Method Details

    • getInputCount

      protected abstract int getInputCount(R recipe)
    • getOutputCount

      protected abstract int getOutputCount(R recipe)
    • hasBlueprintTemplate

      protected abstract boolean hasBlueprintTemplate(R recipe)
    • addInputSlots

      protected abstract void addInputSlots(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, R recipe, int inputXOffset)
    • addOutputSlots

      protected abstract void addOutputSlots(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, R recipe, int outputXOffset)
    • addBlueprintSlot

      protected abstract void addBlueprintSlot(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, R recipe, int machineXOffset)
    • getInputXOffset

      protected int getInputXOffset(R recipe, int inputCount)
    • getOutputXOffset

      protected int getOutputXOffset(R recipe, int outputCount)
    • getMachineXOffset

      protected int getMachineXOffset(R recipe)
    • getMachines

      protected net.minecraft.world.item.ItemStack[] getMachines(R recipe)
    • drawRecipeExtras

      protected void drawRecipeExtras(R recipe, net.minecraft.client.gui.GuiGraphics graphics)
    • addItemSlot

      protected mezz.jei.api.gui.builder.IRecipeSlotBuilder addItemSlot(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, mezz.jei.api.recipe.RecipeIngredientRole role, int x, int y)
      NEI draws 18x18 item slot frames at (x - 1, y - 1).
    • addUnframedSlot

      protected mezz.jei.api.gui.builder.IRecipeSlotBuilder addUnframedSlot(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, mezz.jei.api.recipe.RecipeIngredientRole role, int x, int y)
      Machine / blueprint icons sit inside the tall NEI machine frame, not in item slot frames.
    • getBackground

      public mezz.jei.api.gui.drawable.IDrawable getBackground()
      Specified by:
      getBackground in interface mezz.jei.api.recipe.category.IRecipeCategory<R>
    • getIcon

      public mezz.jei.api.gui.drawable.IDrawable getIcon()
      Specified by:
      getIcon in interface mezz.jei.api.recipe.category.IRecipeCategory<R>
    • getWidth

      public int getWidth()
      Specified by:
      getWidth in interface mezz.jei.api.recipe.category.IRecipeCategory<R>
    • getHeight

      public int getHeight()
      Specified by:
      getHeight in interface mezz.jei.api.recipe.category.IRecipeCategory<R>
    • setRecipe

      public void setRecipe(mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, R recipe, mezz.jei.api.recipe.IFocusGroup focuses)
      Specified by:
      setRecipe in interface mezz.jei.api.recipe.category.IRecipeCategory<R>
    • draw

      public void draw(R recipe, mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, net.minecraft.client.gui.GuiGraphics guiGraphics, double mouseX, double mouseY)
      Specified by:
      draw in interface mezz.jei.api.recipe.category.IRecipeCategory<R>