public abstract class GuiIngredientGroup<V,T extends GuiIngredient<V>> extends java.lang.Object implements IGuiIngredientGroup<V>
| Modifier and Type | Field and Description |
|---|---|
protected Focus |
focus |
protected java.util.Map<java.lang.Integer,T> |
guiIngredients |
protected int |
itemCycleOffset |
| Constructor and Description |
|---|
GuiIngredientGroup() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTooltipCallback(ITooltipCallback<V> tooltipCallback)
Add a callback to alter the tooltip for these ingredients.
|
T |
draw(net.minecraft.client.Minecraft minecraft,
int xOffset,
int yOffset,
int mouseX,
int mouseY) |
Focus |
getFocusUnderMouse(int xOffset,
int yOffset,
int mouseX,
int mouseY) |
java.util.Map<java.lang.Integer,T> |
getGuiIngredients()
Get the ingredients after they have been set.
|
void |
set(int slotIndex,
java.util.Collection<V> values)
Set the ingredient at slotIndex to a rotating collection of ingredients.
|
void |
set(int slotIndex,
V value)
Set the ingredient at slotIndex to a specific ingredient.
|
void |
setFocus(Focus focus)
If focus is set and any of the guiIngredients contains focus
they will only display focus instead of rotating through all their values.
|
protected final int itemCycleOffset
@Nonnull protected final java.util.Map<java.lang.Integer,T extends GuiIngredient<V>> guiIngredients
@Nonnull protected Focus focus
public void setFocus(@Nonnull
Focus focus)
public void set(int slotIndex,
@Nonnull
java.util.Collection<V> values)
IGuiIngredientGroupset in interface IGuiIngredientGroup<V>public void set(int slotIndex,
@Nonnull
V value)
IGuiIngredientGroupset in interface IGuiIngredientGroup<V>public void addTooltipCallback(@Nonnull
ITooltipCallback<V> tooltipCallback)
IGuiIngredientGroupaddTooltipCallback in interface IGuiIngredientGroup<V>@Nonnull public java.util.Map<java.lang.Integer,T> getGuiIngredients()
IGuiIngredientGroupgetGuiIngredients in interface IGuiIngredientGroup<V>@Nullable public Focus getFocusUnderMouse(int xOffset, int yOffset, int mouseX, int mouseY)
@Nullable public T draw(@Nonnull net.minecraft.client.Minecraft minecraft, int xOffset, int yOffset, int mouseX, int mouseY)