public interface IGuiIngredientGroup<T>
IRecipeLayout
.IGuiItemStackGroup
,
IGuiFluidStackGroup
Modifier and Type | Method and Description |
---|---|
void |
addTooltipCallback(ITooltipCallback<T> tooltipCallback)
Add a callback to alter the tooltip for these ingredients.
|
java.util.Map<java.lang.Integer,? extends IGuiIngredient<T>> |
getGuiIngredients()
Get the ingredients after they have been set.
|
void |
init(int slotIndex,
boolean input,
IIngredientRenderer<T> ingredientRenderer,
int xPosition,
int yPosition,
int width,
int height,
int xPadding,
int yPadding)
Initialize a custom guiIngredient for the given slot.
|
void |
init(int slotIndex,
boolean input,
int xPosition,
int yPosition)
Initialize a guiIngredient for the given slot.
|
void |
set(IIngredients ingredients)
Set all the ingredients in the group, based on the
IIngredients
passed to IRecipeCategory.setRecipe(IRecipeLayout, Object, IIngredients) . |
void |
set(int slotIndex,
java.util.List<T> ingredients)
Set the ingredient at slotIndex to a rotating collection of ingredients.
|
void |
set(int slotIndex,
T ingredient)
Set the ingredient at slotIndex to a specific ingredient.
|
void |
setBackground(int slotIndex,
IDrawable background)
Set a background image to draw behind the ingredient.
|
void |
setOverrideDisplayFocus(IFocus<T> focus) |
void set(IIngredients ingredients)
IIngredients
passed to IRecipeCategory.setRecipe(IRecipeLayout, Object, IIngredients)
.void set(int slotIndex, @Nullable java.util.List<T> ingredients)
void set(int slotIndex, @Nullable T ingredient)
void setBackground(int slotIndex, IDrawable background)
void addTooltipCallback(ITooltipCallback<T> tooltipCallback)
java.util.Map<java.lang.Integer,? extends IGuiIngredient<T>> getGuiIngredients()
void init(int slotIndex, boolean input, int xPosition, int yPosition)
IModIngredientRegistration
.
Uses the default IIngredientRenderer
registered for the ingredient list in IModIngredientRegistration.register(IIngredientType, Collection, IIngredientHelper, IIngredientRenderer)
Uses the same 16x16 size as the ingredient list.
For more advanced control over rendering, use init(int, boolean, IIngredientRenderer, int, int, int, int, int, int)
slotIndex
- the slot index of this ingredientinput
- whether this slot is an inputxPosition
- x position relative to the recipe backgroundyPosition
- y position relative to the recipe backgroundIGuiItemStackGroup.init(int, boolean, int, int)
,
IGuiFluidStackGroup.init(int, boolean, int, int, int, int, int, boolean, IDrawable)
void init(int slotIndex, boolean input, IIngredientRenderer<T> ingredientRenderer, int xPosition, int yPosition, int width, int height, int xPadding, int yPadding)
init(int, boolean, int, int)
.
For FluidStack, see IGuiFluidStackGroup.init(int, boolean, int, int, int, int, int, boolean, IDrawable)
This can handle mod ingredients registered with IModIngredientRegistration
.slotIndex
- the slot index of this ingredientinput
- whether this slot is an inputingredientRenderer
- the ingredient renderer for this ingredientxPosition
- x position relative to the recipe backgroundyPosition
- y position relative to the recipe backgroundwidth
- width of this ingredientheight
- height of this ingredientxPadding
- the extra x padding added to each side when drawing the ingredientyPadding
- the extra y padding added to each side when drawing the ingredientIGuiItemStackGroup.init(int, boolean, int, int)
,
IGuiFluidStackGroup.init(int, boolean, int, int, int, int, int, boolean, IDrawable)