Class HolderIngredientHelper<T,H extends HolderIngredientHelper.HolderHolder<T>>
java.lang.Object
petrolpark.mc.library.compat.jei.ingredient.HolderIngredientHelper<T,H>
- All Implemented Interfaces:
mezz.jei.api.ingredients.IIngredientHelper<H>
@ParametersAreNonnullByDefault
public class HolderIngredientHelper<T,H extends HolderIngredientHelper.HolderHolder<T>>
extends Object
implements mezz.jei.api.ingredients.IIngredientHelper<H>
An IIngredientHelper for data-pack registered objects.
The type of the Helper and the associated IIngredientType should be subclass of HolderIngredientHelper.HolderHolder, which wraps a Holder of the data-registered object.
IIngredientTypes based on the Class of ingredient. Seeing as we want to preserve the Holder that wraps data-registered objects,
but generic types are lost at runtime, we need to wrap the Holder, which is why we need this HolderHolder nonsense.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHolderIngredientHelper(mezz.jei.api.ingredients.IIngredientType<H> ingredientType, net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registryKey, Function<net.minecraft.core.Holder<T>, H> holderHolderer) HolderIngredientHelper(mezz.jei.api.ingredients.IIngredientType<H> ingredientType, net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registryKey, Function<net.minecraft.core.Holder<T>, H> holderHolderer, String langKey) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTagRecipes(mezz.jei.api.registration.IRecipeRegistration registration) com.mojang.serialization.Codec<H> codec()copyIngredient(H ingredient) getDisplayModId(H ingredient) getDisplayName(H ingredient) net.minecraft.network.chat.ComponentgetDisplayNameComponent(H ingredient) getErrorInfo(H ingredient) mezz.jei.api.ingredients.IIngredientType<H> net.minecraft.core.Registry<T> net.minecraft.resources.ResourceLocationgetResourceLocation(H ingredient) getUniqueId(H ingredient, mezz.jei.api.ingredients.subtypes.UidContext context) voidregisterTagInfoCategory(mezz.jei.api.registration.IRecipeCategoryRegistration registration) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface mezz.jei.api.ingredients.IIngredientHelper
copyWithAmount, getAmount, getCheatItemStack, getColors, getGroupingUid, getGroupingUid, getTagEquivalent, getTagKeyEquivalent, getTagStream, getUid, getUid, getWildcardId, hasSubtypes, isHiddenFromRecipeViewersByTags, isHiddenFromRecipeViewersByTags, isIngredientOnServer, isValidIngredient, normalizeIngredient
-
Field Details
-
ingredientType
public final mezz.jei.api.ingredients.IIngredientType<H extends HolderIngredientHelper.HolderHolder<T>> ingredientType -
registryKey
-
holderHolderer
public final Function<net.minecraft.core.Holder<T>,H extends HolderIngredientHelper.HolderHolder<T>> holderHolderer -
langKey
-
tagInfoRecipeType
public final mezz.jei.api.recipe.RecipeType<mezz.jei.library.plugins.jei.tags.ITagInfoRecipe> tagInfoRecipeType
-
-
Constructor Details
-
HolderIngredientHelper
-
HolderIngredientHelper
-
-
Method Details
-
getIngredientType
- Specified by:
getIngredientTypein interfacemezz.jei.api.ingredients.IIngredientHelper<T>
-
getRegistry
-
getDisplayName
- Specified by:
getDisplayNamein interfacemezz.jei.api.ingredients.IIngredientHelper<T>
-
getDisplayNameComponent
-
getUniqueId
- Specified by:
getUniqueIdin interfacemezz.jei.api.ingredients.IIngredientHelper<T>
-
getResourceLocation
- Specified by:
getResourceLocationin interfacemezz.jei.api.ingredients.IIngredientHelper<T>
-
copyIngredient
- Specified by:
copyIngredientin interfacemezz.jei.api.ingredients.IIngredientHelper<T>
-
getErrorInfo
- Specified by:
getErrorInfoin interfacemezz.jei.api.ingredients.IIngredientHelper<T>
-
getDisplayModId
- Specified by:
getDisplayModIdin interfacemezz.jei.api.ingredients.IIngredientHelper<T>
-
codec
-
streamAll
-
registerTagInfoCategory
public void registerTagInfoCategory(mezz.jei.api.registration.IRecipeCategoryRegistration registration) -
addTagRecipes
public void addTagRecipes(mezz.jei.api.registration.IRecipeRegistration registration)
-