Class JobBasedRecipeCategory<T>

java.lang.Object
mezz.jei.api.recipe.category.AbstractRecipeCategory<T>
com.minecolonies.core.compatibility.jei.JobBasedRecipeCategory<T>
All Implemented Interfaces:
mezz.jei.api.recipe.category.IRecipeCategory<T>
Direct Known Subclasses:
FishermanRecipeCategory, FloristRecipeCategory, GenericRecipeCategory

public abstract class JobBasedRecipeCategory<T> extends mezz.jei.api.recipe.category.AbstractRecipeCategory<T>
Base class for a JEI recipe category that displays a Minecolonies citizen based on a job. //* @param The recipe type.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
     
    protected static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final @NotNull mezz.jei.api.gui.drawable.IDrawableStatic
     
    protected static final int
     
    protected static final int
     
    protected static final int
     
    protected static final int
     
    protected static final int
     
    protected final @NotNull IJob<?>
     
    protected final @NotNull mezz.jei.api.gui.drawable.IDrawableStatic
     
    protected static final net.minecraft.resources.ResourceLocation
     
    protected static final int
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    JobBasedRecipeCategory(@NotNull IJob<?> job, @NotNull mezz.jei.api.recipe.RecipeType<T> type, @NotNull net.minecraft.world.item.ItemStack icon, @NotNull mezz.jei.api.helpers.IGuiHelper guiHelper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addToolSlot(@NotNull mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, @NotNull EquipmentTypeEntry requiredTool, int x, int y, boolean withBackground)
    Creates a display slot for the specified tool
    void
    createRecipeExtras(@NotNull mezz.jei.api.gui.widgets.IRecipeExtrasBuilder builder, T recipe, @NotNull mezz.jei.api.recipe.IFocusGroup focuses)
     
    void
    draw(T recipe, @NotNull mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, @NotNull net.minecraft.client.gui.GuiGraphics stack, double mouseX, double mouseY)
     
    findRecipes(@NotNull Map<CraftingType,List<IGenericRecipe>> vanilla, @NotNull List<net.minecraft.world.entity.animal.Animal> animals, @NotNull net.minecraft.world.level.Level world)
     
    protected abstract @NotNull List<net.minecraft.network.chat.Component>
     
    @NotNull net.minecraft.world.item.ItemStack
     
    protected static @NotNull net.minecraft.world.item.ItemStack
    getCatalyst(@NotNull BuildingEntry building)
     
    @NotNull IJob<?>
     
    void
    getTooltip(@NotNull mezz.jei.api.gui.builder.ITooltipBuilder tooltip, T recipe, @NotNull mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY)
     

    Methods inherited from class mezz.jei.api.recipe.category.AbstractRecipeCategory

    getHeight, getIcon, getRecipeType, getTitle, getWidth

    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, getBackground, getCodec, getRegistryName, getTooltipStrings, handleInput, isHandled, needsRecipeBorder, onDisplayedIngredientsUpdate, setRecipe
  • Field Details

    • TEXTURE

      protected static final net.minecraft.resources.ResourceLocation TEXTURE
    • job

      @NotNull protected final @NotNull IJob<?> job
    • slot

      @NotNull protected final @NotNull mezz.jei.api.gui.drawable.IDrawableStatic slot
    • chanceSlot

      @NotNull protected final @NotNull mezz.jei.api.gui.drawable.IDrawableStatic chanceSlot
    • WIDTH

      protected static final int WIDTH
      See Also:
    • HEIGHT

      protected static final int HEIGHT
      See Also:
    • CITIZEN_X

      protected static final int CITIZEN_X
      See Also:
    • CITIZEN_Y

      protected static final int CITIZEN_Y
      See Also:
    • CITIZEN_W

      protected static final int CITIZEN_W
      See Also:
    • CITIZEN_H

      protected static final int CITIZEN_H
      See Also:
  • Constructor Details

    • JobBasedRecipeCategory

      protected JobBasedRecipeCategory(@NotNull @NotNull IJob<?> job, @NotNull @NotNull mezz.jei.api.recipe.RecipeType<T> type, @NotNull @NotNull net.minecraft.world.item.ItemStack icon, @NotNull @NotNull mezz.jei.api.helpers.IGuiHelper guiHelper)
  • Method Details

    • getCatalyst

      @NotNull public @NotNull net.minecraft.world.item.ItemStack getCatalyst()
    • getCatalyst

      @NotNull protected static @NotNull net.minecraft.world.item.ItemStack getCatalyst(@NotNull @NotNull BuildingEntry building)
    • getJob

      @NotNull public @NotNull IJob<?> getJob()
    • findRecipes

      public List<T> findRecipes(@NotNull @NotNull Map<CraftingType,List<IGenericRecipe>> vanilla, @NotNull @NotNull List<net.minecraft.world.entity.animal.Animal> animals, @NotNull @NotNull net.minecraft.world.level.Level world)
    • addToolSlot

      protected void addToolSlot(@NotNull @NotNull mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, @NotNull @NotNull EquipmentTypeEntry requiredTool, int x, int y, boolean withBackground)
      Creates a display slot for the specified tool
      Parameters:
      builder - the layout builder
      requiredTool - the required tool
      x - the horizontal coordinate
      y - the vertical
      withBackground - true to display a slot background when present (no background is shown when no tool)
    • draw

      public void draw(@NotNull T recipe, @NotNull @NotNull mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, @NotNull @NotNull net.minecraft.client.gui.GuiGraphics stack, double mouseX, double mouseY)
    • createRecipeExtras

      public void createRecipeExtras(@NotNull @NotNull mezz.jei.api.gui.widgets.IRecipeExtrasBuilder builder, @NotNull T recipe, @NotNull @NotNull mezz.jei.api.recipe.IFocusGroup focuses)
    • getTooltip

      public void getTooltip(@NotNull @NotNull mezz.jei.api.gui.builder.ITooltipBuilder tooltip, @NotNull T recipe, @NotNull @NotNull mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY)
    • generateInfoBlocks

      @NotNull protected abstract @NotNull List<net.minecraft.network.chat.Component> generateInfoBlocks(@NotNull T recipe)