Class OverlayRecipeComponent

java.lang.Object
net.minecraft.client.gui.screens.recipebook.OverlayRecipeComponent
All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement

public class OverlayRecipeComponent extends Object implements GuiEventListener, Renderable
  • Field Details

  • Constructor Details

    • OverlayRecipeComponent

      public OverlayRecipeComponent(SlotSelectTime slotSelectTime, boolean isFurnaceMenu)
  • Method Details

    • init

      public void init(RecipeCollection collection, ContextMap context, boolean isFiltering, int buttonX, int buttonY, int centerX, int centerY, float buttonWidth)
    • getRecipeCollection

      public RecipeCollection getRecipeCollection()
    • getLastRecipeClicked

      public @Nullable RecipeDisplayId getLastRecipeClicked()
    • mouseClicked

      public boolean mouseClicked(MouseButtonEvent event, boolean doubleClick)
      Specified by:
      mouseClicked in interface GuiEventListener
    • isMouseOver

      public boolean isMouseOver(double mouseX, double mouseY)
      Description copied from interface: GuiEventListener
      Checks if the given mouse coordinates are over the GUI element.

      Specified by:
      isMouseOver in interface GuiEventListener
      Parameters:
      mouseX - the X coordinate of the mouse.
      mouseY - the Y coordinate of the mouse.
      Returns:
      true if the mouse is over the GUI element, false otherwise.
    • render

      public void render(GuiGraphics graphics, int mouseX, int mouseY, float a)
      Description copied from interface: Renderable
      Renders the graphical user interface (GUI) element.
      Specified by:
      render in interface Renderable
      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: GuiEventListener
      Sets the focus state of the GUI element.
      Specified by:
      setFocused in interface GuiEventListener
      Parameters:
      focused - true to apply focus, false to remove focus
    • isFocused

      public boolean isFocused()
      Specified by:
      isFocused in interface GuiEventListener