All Known Implementing Classes:
EnchantTooltip.Apply, EnchantTooltip.Empty, EnchantTooltip.Maxed, EnchantTooltip.MissingSource, EnchantTooltip.Transfer, EnchantTooltip.Upgrade

A sealed interface representing a command to render an enchantment tooltip.

Implements the Command Pattern, decoupling the tooltip state evaluation from the actual GUI rendering logic. Specific implementations (like EnchantTooltip.Upgrade or EnchantTooltip.MissingSource) encapsulate the data context required to draw text dynamically on the screen.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Tooltip Command: Renders a newly rolled enchantment generated by the enchanting table.
    static final record 
    Tooltip Command: Empty implementation used as a null object pattern when an invalid or empty widget is hovered.
    static final record 
    Tooltip Command: Renders standard information for an enchantment that has reached its maximum level.
    static final record 
    Tooltip Command: Renders an error-state tooltip when the user attempts an upgrade, but the configured UpgradeSourceType rules demand a valid source catalyst that is currently absent from the UI.
    static final record 
    Tooltip Command: Renders information for transferring an enchantment from a source book.
    static final record 
    Tooltip Command: Renders information for a pending upgrade on the target item, incrementing the displayed level to reflect the projected outcome.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.Identifier
    The resource location referencing the standard galactic alphabet font used for table generation obfuscation.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    drawTooltipCost(List<net.minecraft.util.FormattedCharSequence> list, EnchantTooltipContext ctx)
    Appends standard cost indicators (Lapis and XP level requirements) to the provided formatted sequence list.
     
    static boolean
     
     
    boolean
    render(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY)
    Executes the tooltip rendering logic.
  • Field Details

    • GALACTIC_FONT_ID

      static final net.minecraft.resources.Identifier GALACTIC_FONT_ID
      The resource location referencing the standard galactic alphabet font used for table generation obfuscation.
  • Method Details

    • render

      boolean render(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY)
      Executes the tooltip rendering logic.
      Parameters:
      context - The graphics context to render to.
      mouseX - The current X position of the mouse pointer.
      mouseY - The current Y position of the mouse pointer.
      Returns:
      true if the tooltip was rendered, false if this command is empty.
    • drawTooltipCost

      static void drawTooltipCost(List<net.minecraft.util.FormattedCharSequence> list, EnchantTooltipContext ctx)
      Appends standard cost indicators (Lapis and XP level requirements) to the provided formatted sequence list. Skipped entirely if the player is in creative mode.
      Parameters:
      list - The target list of formatted sequences to mutate.
      ctx - The evaluation context holding player state and costs.
    • getThemeColoring

      static ColoringMode getThemeColoring()
    • getLevelColoring

      static ColoringMode getLevelColoring()
    • getShowFirstLevel

      static boolean getShowFirstLevel()