public class ProfilerRecipeHandler extends java.lang.Object implements ICraftingHandler, IUsageHandler
| Constructor and Description |
|---|
ProfilerRecipeHandler(boolean crafting) |
| Modifier and Type | Method and Description |
|---|---|
void |
drawBackground(int recipe)
Draw the background of this recipe handler (basically the slot layout image).
|
void |
drawForeground(int recipe)
Draw the foreground of this recipe handler (for things like progress bars).
|
java.util.ArrayList<PositionedStack> |
getIngredientStacks(int recipe) |
java.util.ArrayList<PositionedStack> |
getOtherStacks(int recipetype) |
IOverlayHandler |
getOverlayHandler(net.minecraft.client.gui.inventory.GuiContainer gui,
int recipe) |
IRecipeOverlayRenderer |
getOverlayRenderer(net.minecraft.client.gui.inventory.GuiContainer gui,
int recipe) |
static TaskProfiler |
getProfiler() |
ICraftingHandler |
getRecipeHandler(java.lang.String outputId,
java.lang.Object... results) |
java.lang.String |
getRecipeName() |
PositionedStack |
getResultStack(int recipe) |
IUsageHandler |
getUsageHandler(java.lang.String inputId,
java.lang.Object... ingredients) |
java.util.List<java.lang.String> |
handleItemTooltip(GuiRecipe gui,
ItemStack stack,
java.util.List<java.lang.String> currenttip,
int recipe) |
java.util.List<java.lang.String> |
handleTooltip(GuiRecipe gui,
java.util.List<java.lang.String> currenttip,
int recipe) |
boolean |
hasOverlay(net.minecraft.client.gui.inventory.GuiContainer gui,
Container container,
int recipe) |
boolean |
keyTyped(GuiRecipe gui,
char keyChar,
int keyCode,
int recipe) |
boolean |
mouseClicked(GuiRecipe gui,
int button,
int recipe) |
int |
numRecipes() |
void |
onUpdate()
A tick function called for updating progress bars and cycling damage items.
|
int |
recipiesPerPage() |
public static TaskProfiler getProfiler()
public java.lang.String getRecipeName()
getRecipeName in interface IRecipeHandlerpublic int numRecipes()
numRecipes in interface IRecipeHandlerpublic void drawBackground(int recipe)
IRecipeHandlerdrawBackground in interface IRecipeHandlerrecipe - The recipe index to draw at this position.public void drawForeground(int recipe)
IRecipeHandlerdrawForeground in interface IRecipeHandlerrecipe - The recipe index to draw at this position.public java.util.ArrayList<PositionedStack> getIngredientStacks(int recipe)
getIngredientStacks in interface IRecipeHandlerrecipe - The recipe index to get items for.PositionedStacks in this recipe relative to the top left corner of your recipe drawing space.public java.util.ArrayList<PositionedStack> getOtherStacks(int recipetype)
getOtherStacks in interface IRecipeHandlerPositionedStacks in this recipe relative to the top left corner of your recipe drawing space. For example fuel in furnaces.public PositionedStack getResultStack(int recipe)
getResultStack in interface IRecipeHandlerrecipe - The recipe index to get the result for.PositionedStack relative to the top left corner of your recipe drawing space.public void onUpdate()
IRecipeHandleronUpdate in interface IRecipeHandlerpublic boolean hasOverlay(net.minecraft.client.gui.inventory.GuiContainer gui,
Container container,
int recipe)
hasOverlay in interface IRecipeHandlergui - The GUI to overlay.container - The container of the GUI.recipe - The recipe index to check for.public IRecipeOverlayRenderer getOverlayRenderer(net.minecraft.client.gui.inventory.GuiContainer gui, int recipe)
getOverlayRenderer in interface IRecipeHandlerrecipe - The recipe index to get the overlay renderer for.IRecipeOverlayRenderer to be used for rendering the overlay of this specific recipe.public IOverlayHandler getOverlayHandler(net.minecraft.client.gui.inventory.GuiContainer gui, int recipe)
getOverlayHandler in interface IRecipeHandlerrecipe - The recipe index to get the overlay renderer for.IOverlayHandler to be used for rendering the overlay of this specific recipe.public int recipiesPerPage()
recipiesPerPage in interface IRecipeHandlerpublic java.util.List<java.lang.String> handleTooltip(GuiRecipe gui, java.util.List<java.lang.String> currenttip, int recipe)
handleTooltip in interface IRecipeHandlergui - An instance of the currentscreencurrenttip - The current tooltip, will contain item name and inforecipe - The recipe index being handledpublic java.util.List<java.lang.String> handleItemTooltip(GuiRecipe gui, ItemStack stack, java.util.List<java.lang.String> currenttip, int recipe)
handleItemTooltip in interface IRecipeHandlergui - An instance of the currentscreenrecipe - The recipe index being handledpublic boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe)
keyTyped in interface IRecipeHandlergui - An instance of the currentscreenkeyChar - The character representing the keyPresskeyCode - The KeyCode as defined in Keyboardpublic boolean mouseClicked(GuiRecipe gui, int button, int recipe)
mouseClicked in interface IRecipeHandlergui - An instance of the currentscreenbutton - The button index being pressed, {0 = Left Click, 1 = Right Click, 2 = Middle Click}public IUsageHandler getUsageHandler(java.lang.String inputId, java.lang.Object... ingredients)
getUsageHandler in interface IUsageHandlerinputId - A String identifier representing the type of ingredients used. Eg. {"item", "fuel"}ingredients - Objects representing the ingredients that matching recipes must contain.IUsageHandler configured with a list of recipes that contain matching inputpublic ICraftingHandler getRecipeHandler(java.lang.String outputId, java.lang.Object... results)
getRecipeHandler in interface ICraftingHandleroutputId - A String identifier representing the type of output produced. Eg. {"item", "fuel"}results - Objects representing the results that matching recipes must produce.ICraftingHandler configured with a list of recipes that produce matching output.