Class OverlayRecipeComponent
java.lang.Object
net.minecraft.client.gui.screens.recipebook.OverlayRecipeComponent
- All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate RecipeCollectionprivate final booleanprivate booleanprivate static final floatprivate @Nullable RecipeDisplayIdprivate static final intprivate static final intprivate static final Identifierprivate final List<OverlayRecipeComponent.OverlayRecipeButton> private final SlotSelectTimeprivate intprivate int -
Constructor Summary
ConstructorsConstructorDescriptionOverlayRecipeComponent(SlotSelectTime slotSelectTime, boolean isFurnaceMenu) -
Method Summary
Modifier and TypeMethodDescription@Nullable RecipeDisplayIdvoidinit(RecipeCollection collection, ContextMap context, boolean isFiltering, int buttonX, int buttonY, int centerX, int centerY, float buttonWidth) booleanbooleanisMouseOver(double mouseX, double mouseY) Checks if the given mouse coordinates are over the GUI element.booleanbooleanmouseClicked(MouseButtonEvent event, boolean doubleClick) voidrender(GuiGraphics graphics, int mouseX, int mouseY, float a) Renders the graphical user interface (GUI) element.voidsetFocused(boolean focused) Sets the focus state of the GUI element.voidsetVisible(boolean visible) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, getRectangle, keyPressed, keyReleased, mouseDragged, mouseMoved, mouseReleased, mouseScrolled, nextFocusPath, shouldTakeFocusAfterInteractionMethods inherited from interface TabOrderedElement
getTabOrderGroup
-
Field Details
-
OVERLAY_RECIPE_SPRITE
-
MAX_ROW
private static final int MAX_ROW- See Also:
-
MAX_ROW_LARGE
private static final int MAX_ROW_LARGE- See Also:
-
ITEM_RENDER_SCALE
private static final float ITEM_RENDER_SCALE- See Also:
-
BUTTON_SIZE
public static final int BUTTON_SIZE- See Also:
-
recipeButtons
-
isVisible
private boolean isVisible -
x
private int x -
y
private int y -
collection
-
lastRecipeClicked
-
slotSelectTime
-
isFurnaceMenu
private final boolean isFurnaceMenu
-
-
Constructor Details
-
OverlayRecipeComponent
-
-
Method Details
-
init
public void init(RecipeCollection collection, ContextMap context, boolean isFiltering, int buttonX, int buttonY, int centerX, int centerY, float buttonWidth) -
getRecipeCollection
-
getLastRecipeClicked
-
mouseClicked
- Specified by:
mouseClickedin interfaceGuiEventListener
-
isMouseOver
public boolean isMouseOver(double mouseX, double mouseY) Description copied from interface:GuiEventListenerChecks if the given mouse coordinates are over the GUI element.- Specified by:
isMouseOverin interfaceGuiEventListener- Parameters:
mouseX- the X coordinate of the mouse.mouseY- the Y coordinate of the mouse.- Returns:
trueif the mouse is over the GUI element,falseotherwise.
-
render
Description copied from interface:RenderableRenders the graphical user interface (GUI) element.- Specified by:
renderin interfaceRenderable- Parameters:
graphics- the GuiGraphics object used for rendering.mouseX- the x-coordinate of the mouse cursor.mouseY- the y-coordinate of the mouse cursor.a- the partial tick time.
-
setVisible
public void setVisible(boolean visible) -
isVisible
public boolean isVisible() -
setFocused
public void setFocused(boolean focused) Description copied from interface:GuiEventListenerSets the focus state of the GUI element.- Specified by:
setFocusedin interfaceGuiEventListener- Parameters:
focused-trueto apply focus,falseto remove focus
-
isFocused
public boolean isFocused()- Specified by:
isFocusedin interfaceGuiEventListener
-