java.lang.Object
johnsmith.enchantingoverhauled.client.gui.widget.enchant.EnchantWidget
johnsmith.enchantingoverhauled.client.gui.widget.enchant.EnchantWidget.Empty
Enclosing class:
EnchantWidget

public static final class EnchantWidget.Empty extends EnchantWidget
A non-interactable filler widget used to pad the Enchantment Screen's list view when there are fewer active enchantment contexts available than the current page size.
  • Constructor Details

    • Empty

      public Empty(int x, int y, EnchantRenderState state, int texIndex, boolean usePlainBackground, Runnable onPressAction)
      Constructs a new EnchantWidget.Empty.
      Parameters:
      x - The X screen coordinate.
      y - The Y screen coordinate.
      state - The state object (typically initialized to an empty default).
      texIndex - The deterministic texture index to use.
      usePlainBackground - True if the plain background setting is enabled.
      onPressAction - The action callback (unused in empty widgets).
  • Method Details

    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int button)
      Denies all click interactions for empty widgets.
      Overrides:
      mouseClicked in class EnchantWidget
      Parameters:
      mouseX - The X coordinate of the mouse pointer.
      mouseY - The Y coordinate of the mouse pointer.
      button - The mouse button pressed.
      Returns:
      Always false.
    • renderWidget

      protected void renderWidget(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY, float partialTick)
      Renders a blank, disabled background texture as a placeholder. Defaults to the Table Source's disabled texture style for aesthetic consistency.
      Specified by:
      renderWidget in class EnchantWidget
      Parameters:
      context - The GUI graphics context to draw to.
      mouseX - The current mouse X coordinate.
      mouseY - The current mouse Y coordinate.
      partialTick - The partial tick time for animations.