public interface IIngredientHelper<V>
IModIngredientRegistration.register(IIngredientType, Collection, IIngredientHelper, IIngredientRenderer)
Modifier and Type | Method and Description |
---|---|
V |
copyIngredient(V ingredient)
Makes a copy of the given ingredient.
|
default net.minecraft.item.ItemStack |
getCheatItemStack(V ingredient)
Called when a player is in cheat mode and clicks an ingredient in the list.
|
default java.lang.Iterable<java.lang.Integer> |
getColors(V ingredient)
Get the main colors of this ingredient.
|
default java.util.Collection<java.lang.String> |
getCreativeTabNames(V ingredient)
Get a list of creative tab names that include this ingredient.
|
default java.lang.String |
getDisplayModId(V ingredient)
Return the modId of the mod that should be displayed.
|
java.lang.String |
getDisplayName(V ingredient)
Display name used for searching.
|
java.lang.String |
getErrorInfo(V ingredient)
Get information for error messages involving this ingredient.
|
V |
getMatch(java.lang.Iterable<V> ingredients,
V ingredientToMatch)
Deprecated.
since JEI 7.3.0. Use
getMatch(Iterable, Object, UidContext) |
default V |
getMatch(java.lang.Iterable<V> ingredients,
V ingredientToMatch,
UidContext context)
Find a matching ingredient from a group of them.
|
java.lang.String |
getModId(V ingredient)
Return the modId of the mod that created this ingredient.
|
java.lang.String |
getResourceId(V ingredient)
Return the resource id of the given ingredient.
|
default java.util.Collection<net.minecraft.util.ResourceLocation> |
getTags(V ingredient)
Get a list of tags that include this ingredient.
|
java.lang.String |
getUniqueId(V ingredient)
Deprecated.
since JEI 7.3.0. Use
getUniqueId(Object, UidContext) |
default java.lang.String |
getUniqueId(V ingredient,
UidContext context)
Unique ID for use in comparing, blacklisting, and looking up ingredients.
|
default java.lang.String |
getWildcardId(V ingredient)
Wildcard ID for use in comparing, blacklisting, and looking up ingredients.
|
default boolean |
isIngredientOnServer(V ingredient)
This is called when connecting to a server, to hide ingredients that are missing on the server.
|
default boolean |
isValidIngredient(V ingredient)
Checks if the given ingredient is valid for lookups and recipes.
|
default V |
normalizeIngredient(V ingredient)
Makes a normalized copy of the given ingredient.
|
default IFocus<?> |
translateFocus(IFocus<V> focus,
IFocusFactory focusFactory)
Change one focus into a different focus.
|
default IFocus<?> translateFocus(IFocus<V> focus, IFocusFactory focusFactory)
@Deprecated @Nullable V getMatch(java.lang.Iterable<V> ingredients, V ingredientToMatch)
getMatch(Iterable, Object, UidContext)
@Nullable default V getMatch(java.lang.Iterable<V> ingredients, V ingredientToMatch, UidContext context)
java.lang.String getDisplayName(V ingredient)
@Deprecated java.lang.String getUniqueId(V ingredient)
getUniqueId(Object, UidContext)
default java.lang.String getUniqueId(V ingredient, UidContext context)
default java.lang.String getWildcardId(V ingredient)
java.lang.String getModId(V ingredient)
default java.lang.String getDisplayModId(V ingredient)
default java.lang.Iterable<java.lang.Integer> getColors(V ingredient)
IColorHelper
java.lang.String getResourceId(V ingredient)
default net.minecraft.item.ItemStack getCheatItemStack(V ingredient)
ingredient
- The ingredient to cheat in. Do not edit this ingredient.V copyIngredient(V ingredient)
ingredient
- the ingredient to copydefault V normalizeIngredient(V ingredient)
ingredient
- the ingredient to copy and normalizedefault boolean isValidIngredient(V ingredient)
ingredient
- the ingredient to checkdefault boolean isIngredientOnServer(V ingredient)
ingredient
- the ingredient to checkdefault java.util.Collection<net.minecraft.util.ResourceLocation> getTags(V ingredient)
default java.util.Collection<java.lang.String> getCreativeTabNames(V ingredient)
java.lang.String getErrorInfo(@Nullable V ingredient)