Interface ShownInTooltip<T>

Type Parameters:
T - the data component type
All Known Subinterfaces:
DyedItemColor, ItemAdventurePredicate, ItemArmorTrim, ItemAttributeModifiers, ItemEnchantments, JukeboxPlayable, Unbreakable

@NullMarked @Experimental @NonExtendable public interface ShownInTooltip<T>
Holds the state of whether a data component should be shown in an item's tooltip.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A builder for creating a ShownInTooltip data component.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Gets if the data component should be shown in the item's tooltip.
    showInTooltip(boolean showInTooltip)
    Returns a copy of this data component with the specified show-in-tooltip state.
  • Method Details

    • showInTooltip

      @Contract(pure=true) boolean showInTooltip()
      Gets if the data component should be shown in the item's tooltip.
      Returns:
      true to show in the tooltip
    • showInTooltip

      @Contract(value="_ -> new", pure=true) T showInTooltip(boolean showInTooltip)
      Returns a copy of this data component with the specified show-in-tooltip state.
      Parameters:
      showInTooltip - true to show in the tooltip
      Returns:
      the new data component