Class JobBasedRecipeCategory<T>

java.lang.Object
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 Object implements mezz.jei.api.recipe.category.IRecipeCategory<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 JeiFakeLevel
     
    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
    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 mezz.jei.api.gui.drawable.IDrawable
     
    @NotNull net.minecraft.world.item.ItemStack
     
    protected static @NotNull net.minecraft.world.item.ItemStack
    getCatalyst(@NotNull BuildingEntry building)
     
    @NotNull mezz.jei.api.gui.drawable.IDrawable
     
    @NotNull IJob<?>
     
    @NotNull mezz.jei.api.recipe.RecipeType<T>
     
    @NotNull net.minecraft.network.chat.Component
     
    @NotNull net.minecraft.network.chat.Component
     
    @NotNull List<net.minecraft.network.chat.Component>
    getTooltipStrings(T recipe, @NotNull mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY)
     

    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

    getHeight, getRegistryName, getWidth, handleInput, isHandled, setRecipe
  • Field Details

    • FAKE_LEVEL

      protected static final JeiFakeLevel FAKE_LEVEL
    • 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()
    • getRecipeType

      @NotNull public @NotNull mezz.jei.api.recipe.RecipeType<T> getRecipeType()
      Specified by:
      getRecipeType in interface mezz.jei.api.recipe.category.IRecipeCategory<T>
    • getTitle

      @NotNull public @NotNull net.minecraft.network.chat.Component getTitle()
      Specified by:
      getTitle in interface mezz.jei.api.recipe.category.IRecipeCategory<T>
    • getTitleAsTextComponent

      @NotNull public @NotNull net.minecraft.network.chat.Component getTitleAsTextComponent()
    • getBackground

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

      @NotNull public @NotNull mezz.jei.api.gui.drawable.IDrawable getIcon()
      Specified by:
      getIcon in interface mezz.jei.api.recipe.category.IRecipeCategory<T>
    • 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)
      Specified by:
      draw in interface mezz.jei.api.recipe.category.IRecipeCategory<T>
    • getTooltipStrings

      @NotNull public @NotNull List<net.minecraft.network.chat.Component> getTooltipStrings(@NotNull T recipe, @NotNull @NotNull mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY)
      Specified by:
      getTooltipStrings in interface mezz.jei.api.recipe.category.IRecipeCategory<T>
    • generateInfoBlocks

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