Interface ItemDataComponent<T>


@GeyserProvided @NonExtendable public interface ItemDataComponent<T>
Data components are used to indicate item behavior. It is expected that any components set on a CustomItemDefinition are always present on the item server-side.
Since:
2.9.3
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    The identifier of the data component.
    The predicate used to validate the component.
    boolean
    Whether the component exists in vanilla Minecraft.
  • Method Details

    • identifier

      Identifier identifier()
      The identifier of the data component.
      Returns:
      the identifier
      Since:
      2.9.3
    • validator

      Predicate<T> validator()
      The predicate used to validate the component.
      Returns:
      the validator
      Since:
      2.9.3
    • vanilla

      boolean vanilla()
      Whether the component exists in vanilla Minecraft.
      Returns:
      whether this component is vanilla
      Since:
      2.9.3