Class EnchantTooltipFactory

java.lang.Object
johnsmith.enchantingoverhauled.client.gui.tooltip.enchant.EnchantTooltipFactory

public class EnchantTooltipFactory extends Object
A factory utility class for evaluating visual render states and instantiating the corresponding EnchantTooltip command implementation.
  • Constructor Details

    • EnchantTooltipFactory

      public EnchantTooltipFactory()
  • Method Details

    • create

      public static EnchantTooltip create(EnchantRenderState state, EnchantTooltipContext ctx)
      Evaluates the provided widget state and context to return the correct Tooltip command.

      Order of operations prioritizes structural states (Maxed, Locked) before evaluating action-based source typings (Target upgrade, Source transfer, Table apply).

      Parameters:
      state - The current UI render state for the slot.
      ctx - The data context for the tooltip instantiation.
      Returns:
      A constructed instance implementing EnchantTooltip.