public interface IRecipeHandler
ICraftingHandler or IUsageHandler| 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.List<PositionedStack> |
getIngredientStacks(int recipe) |
java.util.List<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) |
java.lang.String |
getRecipeName() |
PositionedStack |
getResultStack(int recipe) |
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() |
java.lang.String getRecipeName()
int numRecipes()
void drawBackground(int recipe)
gui - A GuiManager for drawing functions.recipe - The recipe index to draw at this position.void drawForeground(int recipe)
gui - A GuiManager for drawing functions.recipe - The recipe index to draw at this position.java.util.List<PositionedStack> getIngredientStacks(int recipe)
recipe - The recipe index to get items for.PositionedStacks in this recipe relative to the top left corner of your recipe drawing space.java.util.List<PositionedStack> getOtherStacks(int recipetype)
recipe - The recipe index to get items for.PositionedStacks in this recipe relative to the top left corner of your recipe drawing space. For example fuel in furnaces.PositionedStack getResultStack(int recipe)
recipe - The recipe index to get the result for.PositionedStack relative to the top left corner of your recipe drawing space.void onUpdate()
boolean hasOverlay(net.minecraft.client.gui.inventory.GuiContainer gui,
Container container,
int recipe)
recipe - The recipe index to check for.gui - The GUI to overlay.container - The container of the GUI.IRecipeOverlayRenderer getOverlayRenderer(net.minecraft.client.gui.inventory.GuiContainer gui, int recipe)
recipe - The recipe index to get the overlay renderer for.IRecipeOverlayRenderer to be used for rendering the overlay of this specific recipe.IOverlayHandler getOverlayHandler(net.minecraft.client.gui.inventory.GuiContainer gui, int recipe)
recipe - The recipe index to get the overlay renderer for.IOverlayHandler to be used for rendering the overlay of this specific recipe.int recipiesPerPage()
java.util.List<java.lang.String> handleTooltip(GuiRecipe gui, java.util.List<java.lang.String> currenttip, int recipe)
gui - An instance of the currentscreencurrenttip - The current tooltip, will contain item name and inforecipe - The recipe index being handledjava.util.List<java.lang.String> handleItemTooltip(GuiRecipe gui, ItemStack stack, java.util.List<java.lang.String> currenttip, int recipe)
gui - An instance of the currentscreenThe - itemstack currently under the mouseThe - current tooltip, will contain item name and inforecipe - The recipe index being handledboolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe)
gui - An instance of the currentscreenkeyChar - The character representing the keyPresskeyCode - The KeyCode as defined in Keyboardboolean mouseClicked(GuiRecipe gui, int button, int recipe)
gui - An instance of the currentscreenbutton - The button index being pressed, {0 = Left Click, 1 = Right Click, 2 = Middle Click}