public class GuiIngredientGroup<T> extends java.lang.Object implements IGuiIngredientGroup<T>
| Constructor and Description |
|---|
GuiIngredientGroup(java.lang.Class<T> ingredientClass,
IFocus<T> focus,
int cycleOffset) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTooltipCallback(ITooltipCallback<T> tooltipCallback)
Add a callback to alter the tooltip for these ingredients.
|
GuiIngredient<T> |
draw(net.minecraft.client.Minecraft minecraft,
int xOffset,
int yOffset,
int mouseX,
int mouseY) |
IFocus<T> |
getFocus()
The current search focus.
|
java.util.Map<java.lang.Integer,GuiIngredient<T>> |
getGuiIngredients()
Get the ingredients after they have been set.
|
T |
getIngredientUnderMouse(int xOffset,
int yOffset,
int mouseX,
int mouseY) |
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 |
set(IIngredients ingredients)
Set all the ingredients in the group, based on the
IIngredients
passed to IRecipeCategory.setRecipe(IRecipeLayout, IRecipeWrapper, IIngredients). |
void |
set(int slotIndex,
java.util.Collection<T> values)
Deprecated.
|
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 value)
Set the ingredient at slotIndex to a specific ingredient.
|
void |
setOverrideDisplayFocus(IFocus<T> focus) |
public void init(int slotIndex,
boolean input,
IIngredientRenderer<T> ingredientRenderer,
int xPosition,
int yPosition,
int width,
int height,
int xPadding,
int yPadding)
IGuiIngredientGroupIGuiItemStackGroup and IGuiFluidStackGroup.
This is for handling mod ingredients registered with IModIngredientRegistration.init in interface IGuiIngredientGroup<T>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)public IFocus<T> getFocus()
IGuiIngredientGroupgetFocus in interface IGuiIngredientGroup<T>public void set(IIngredients ingredients)
IGuiIngredientGroupIIngredients
passed to IRecipeCategory.setRecipe(IRecipeLayout, IRecipeWrapper, IIngredients).set in interface IGuiIngredientGroup<T>@Deprecated
public void set(int slotIndex,
java.util.Collection<T> values)
IGuiIngredientGroupset in interface IGuiIngredientGroup<T>public void set(int slotIndex,
@Nullable
java.util.List<T> ingredients)
IGuiIngredientGroupset in interface IGuiIngredientGroup<T>public void set(int slotIndex,
@Nullable
T value)
IGuiIngredientGroupset in interface IGuiIngredientGroup<T>public void addTooltipCallback(ITooltipCallback<T> tooltipCallback)
IGuiIngredientGroupaddTooltipCallback in interface IGuiIngredientGroup<T>public java.util.Map<java.lang.Integer,GuiIngredient<T>> getGuiIngredients()
IGuiIngredientGroupgetGuiIngredients in interface IGuiIngredientGroup<T>@Nullable public T getIngredientUnderMouse(int xOffset, int yOffset, int mouseX, int mouseY)
@Nullable public GuiIngredient<T> draw(net.minecraft.client.Minecraft minecraft, int xOffset, int yOffset, int mouseX, int mouseY)
public void setOverrideDisplayFocus(@Nullable
IFocus<T> focus)
setOverrideDisplayFocus in interface IGuiIngredientGroup<T>