public interface IIngredientHelper<V>
If you have a new type of ingredient to add to JEI, you will have to implement this in order to use
IModIngredientRegistration.register(Class, Collection, IIngredientHelper, IIngredientRenderer)
Modifier and Type | Method and Description |
---|---|
net.minecraft.item.ItemStack |
cheatIngredient(V ingredient,
boolean fullStack)
An action for when a player is in cheat mode and clicks an ingredient in the list.
|
V |
copyIngredient(V ingredient)
Makes a copy of the given ingredient.
|
java.util.List<V> |
expandSubtypes(java.util.List<V> ingredients)
Expands any wildcard ingredients into all its subtypes.
|
java.lang.Iterable<java.awt.Color> |
getColors(V ingredient)
Get the main colors of this ingredient.
|
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)
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 |
getUniqueId(V ingredient)
Unique ID for use in comparing, blacklisting, and looking up ingredients.
|
java.lang.String |
getWildcardId(V ingredient)
Wildcard ID for use in comparing, blacklisting, and looking up ingredients.
|
java.util.List<V> expandSubtypes(java.util.List<V> ingredients)
@Nullable V getMatch(java.lang.Iterable<V> ingredients, V ingredientToMatch)
java.lang.String getDisplayName(V ingredient)
java.lang.String getUniqueId(V ingredient)
java.lang.String getWildcardId(V ingredient)
java.lang.String getModId(V ingredient)
java.lang.Iterable<java.awt.Color> getColors(V ingredient)
net.minecraft.item.ItemStack cheatIngredient(V ingredient, boolean fullStack)
This method can either: return an ItemStack for JEI to give the player, or return an empty ItemStack and handle the action manually.
ingredient
- The ingredient to cheat in. Do not edit this ingredient.fullStack
- Only used for manual handling, true if a full stack should be cheated in instead of a single ingredient.V copyIngredient(V ingredient)
ingredient
- the ingredient to copyjava.lang.String getErrorInfo(V ingredient)