public class RecipeLayout extends java.lang.Object implements IRecipeLayoutDrawable
Modifier and Type | Field and Description |
---|---|
static int |
recipeTransferButtonIndex |
Constructor and Description |
---|
RecipeLayout(int index,
IRecipeCategory<T> recipeCategory,
T recipeWrapper,
IFocus focus,
int posX,
int posY) |
Modifier and Type | Method and Description |
---|---|
void |
draw(net.minecraft.client.Minecraft minecraft,
int mouseX,
int mouseY)
Draw the recipe layout.
|
IGuiFluidStackGroup |
getFluidStacks()
Contains all the fluidStacks displayed on this recipe layout.
|
IFocus<?> |
getFocus()
The current search focus.
|
<T> IGuiIngredientGroup<T> |
getIngredientsGroup(java.lang.Class<T> ingredientClass)
Get all the ingredients of one class that are displayed on this recipe layout.
|
java.lang.Object |
getIngredientUnderMouse(int mouseX,
int mouseY)
Returns the ingredient currently under the mouse, if there is one.
|
GuiItemStackGroup |
getItemStacks()
Contains all the itemStacks displayed on this recipe layout.
|
int |
getPosX() |
int |
getPosY() |
IRecipeCategory |
getRecipeCategory() |
RecipeTransferButton |
getRecipeTransferButton() |
IRecipeWrapper |
getRecipeWrapper() |
boolean |
handleClick(net.minecraft.client.Minecraft minecraft,
int mouseX,
int mouseY,
int mouseButton) |
boolean |
isMouseOver(int mouseX,
int mouseY)
Returns true if the mouse is hovering over the recipe.
|
void |
setPosition(int posX,
int posY)
Set the position of the recipe layout in screen coordinates.
|
void |
setRecipeTransferButton(int posX,
int posY)
Moves the recipe transfer button's position relative to the recipe layout.
|
public static final int recipeTransferButtonIndex
public RecipeLayout(int index, IRecipeCategory<T> recipeCategory, T recipeWrapper, IFocus focus, int posX, int posY)
public void setPosition(int posX, int posY)
IRecipeLayoutDrawable
IRecipeCategory.getBackground()
.setPosition
in interface IRecipeLayoutDrawable
public void draw(net.minecraft.client.Minecraft minecraft, int mouseX, int mouseY)
IRecipeLayoutDrawable
draw
in interface IRecipeLayoutDrawable
public boolean isMouseOver(int mouseX, int mouseY)
IRecipeLayoutDrawable
isMouseOver
in interface IRecipeLayoutDrawable
@Nullable public java.lang.Object getIngredientUnderMouse(int mouseX, int mouseY)
IRecipeLayoutDrawable
getIngredientUnderMouse
in interface IRecipeLayoutDrawable
public boolean handleClick(net.minecraft.client.Minecraft minecraft, int mouseX, int mouseY, int mouseButton)
public GuiItemStackGroup getItemStacks()
IRecipeLayout
getItemStacks
in interface IRecipeLayout
public IGuiFluidStackGroup getFluidStacks()
IRecipeLayout
getFluidStacks
in interface IRecipeLayout
public <T> IGuiIngredientGroup<T> getIngredientsGroup(java.lang.Class<T> ingredientClass)
IRecipeLayout
This method is for handling custom item types, registered with IModIngredientRegistration
.
getIngredientsGroup
in interface IRecipeLayout
IRecipeLayout.getItemStacks()
,
IRecipeLayout.getFluidStacks()
public void setRecipeTransferButton(int posX, int posY)
IRecipeLayout
setRecipeTransferButton
in interface IRecipeLayout
public IFocus<?> getFocus()
IRecipeLayout
getFocus
in interface IRecipeLayout
@Nullable public RecipeTransferButton getRecipeTransferButton()
public IRecipeWrapper getRecipeWrapper()
public IRecipeCategory getRecipeCategory()
public int getPosX()
public int getPosY()