public class GuiIngredient<T> extends net.minecraft.client.gui.AbstractGui implements IGuiIngredient<T>
| Constructor and Description |
|---|
GuiIngredient(int slotIndex,
boolean input,
IIngredientRenderer<T> ingredientRenderer,
IIngredientHelper<T> ingredientHelper,
net.minecraft.client.renderer.Rectangle2d rect,
int xPadding,
int yPadding,
int cycleOffset) |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int xOffset,
int yOffset) |
void |
drawHighlight(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int color,
int xOffset,
int yOffset)
Draws a highlight on background of this ingredient.
|
void |
drawOverlays(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int xOffset,
int yOffset,
int mouseX,
int mouseY) |
java.util.List<T> |
getAllIngredients()
All ingredient variations that can be shown.
|
T |
getDisplayedIngredient()
The ingredient variation that is shown at this moment.
|
net.minecraft.client.renderer.Rectangle2d |
getRect() |
boolean |
isInput()
Returns true if this ingredient is an input for the recipe, otherwise it is an output.
|
boolean |
isMode(IFocus.Mode mode) |
boolean |
isMouseOver(double xOffset,
double yOffset,
double mouseX,
double mouseY) |
void |
set(java.util.List<T> ingredients,
Focus<T> focus) |
void |
setBackground(IDrawable background) |
void |
setTooltipCallbacks(java.util.List<ITooltipCallback<T>> tooltipCallbacks) |
public GuiIngredient(int slotIndex,
boolean input,
IIngredientRenderer<T> ingredientRenderer,
IIngredientHelper<T> ingredientHelper,
net.minecraft.client.renderer.Rectangle2d rect,
int xPadding,
int yPadding,
int cycleOffset)
public net.minecraft.client.renderer.Rectangle2d getRect()
public boolean isMouseOver(double xOffset,
double yOffset,
double mouseX,
double mouseY)
@Nullable public T getDisplayedIngredient()
IGuiIngredientgetDisplayedIngredient in interface IGuiIngredient<T>public java.util.List<T> getAllIngredients()
IGuiIngredientgetAllIngredients in interface IGuiIngredient<T>public void setBackground(IDrawable background)
public void setTooltipCallbacks(java.util.List<ITooltipCallback<T>> tooltipCallbacks)
public void draw(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int xOffset,
int yOffset)
public void drawHighlight(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int color,
int xOffset,
int yOffset)
IGuiIngredientdrawHighlight in interface IGuiIngredient<T>IRecipeTransferHandlerHelper.createUserErrorForSlots(net.minecraft.util.text.ITextComponent, Collection).public void drawOverlays(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int xOffset,
int yOffset,
int mouseX,
int mouseY)
public boolean isInput()
IGuiIngredientisInput in interface IGuiIngredient<T>public boolean isMode(IFocus.Mode mode)