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 ClassesModifier and TypeClassDescriptionprotected static classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final @NotNull mezz.jei.api.gui.drawable.IDrawableStaticprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected final @NotNull IJob<?> protected final @NotNull mezz.jei.api.gui.drawable.IDrawableStaticprotected static final net.minecraft.resources.ResourceLocationprotected static final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJobBasedRecipeCategory(@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 TypeMethodDescriptionprotected voidaddToolSlot(@NotNull mezz.jei.api.gui.builder.IRecipeLayoutBuilder builder, @NotNull EquipmentTypeEntry requiredTool, int x, int y, boolean withBackground) Creates a display slot for the specified toolvoidcreateRecipeExtras(@NotNull mezz.jei.api.gui.widgets.IRecipeExtrasBuilder builder, T recipe, @NotNull mezz.jei.api.recipe.IFocusGroup focuses) voiddraw(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> generateInfoBlocks(T recipe) @NotNull net.minecraft.world.item.ItemStackprotected static @NotNull net.minecraft.world.item.ItemStackgetCatalyst(@NotNull BuildingEntry building) @NotNull IJob<?> getJob()voidgetTooltip(@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, getWidthMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
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
-
-
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
-
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 builderrequiredTool- the required toolx- the horizontal coordinatey- the verticalwithBackground- 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
-