public interface IIngredientRenderer<T>
IModIngredientRegistration.register(IIngredientType, Collection, IIngredientHelper, IIngredientRenderer)| Modifier and Type | Method and Description |
|---|---|
default net.minecraft.client.gui.FontRenderer |
getFontRenderer(net.minecraft.client.Minecraft minecraft,
T ingredient)
Get the tooltip font renderer for this ingredient.
|
java.util.List<net.minecraft.util.text.ITextComponent> |
getTooltip(T ingredient,
net.minecraft.client.util.ITooltipFlag tooltipFlag)
Get the tooltip text for this ingredient.
|
void |
render(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int xPosition,
int yPosition,
T ingredient)
Renders an ingredient at a specific location.
|
void render(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int xPosition,
int yPosition,
@Nullable
T ingredient)
xPosition - The x position to render the ingredient.yPosition - The y position to render the ingredient.ingredient - the ingredient to render. May be null, some renderers (like fluid tanks) will render ajava.util.List<net.minecraft.util.text.ITextComponent> getTooltip(T ingredient, net.minecraft.client.util.ITooltipFlag tooltipFlag)
ingredient - The ingredient to get the tooltip for.tooltipFlag - Whether to show advanced information on item tooltips, toggled by F3+Hdefault net.minecraft.client.gui.FontRenderer getFontRenderer(net.minecraft.client.Minecraft minecraft,
T ingredient)
minecraft - The minecraft instance.ingredient - The ingredient to get the tooltip for.