Interface TagType<T,D>

Type Parameters:
T - The entry type of the tag.
D - The test input type for the tag.

public interface TagType<T,D>
Represents a registry type for a Tag, defining its serialization codec and the factory method used to create new tag instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the codec used for serializing and deserializing the tag entries.
    create(net.kyori.adventure.key.Key id)
    Creates a new tag instance associated with this type.
  • Method Details

    • codec

      Codec<T> codec()
      Retrieves the codec used for serializing and deserializing the tag entries.
      Returns:
      The Codec for the tag entry type.
    • create

      Tag<T,D> create(net.kyori.adventure.key.Key id)
      Creates a new tag instance associated with this type.
      Parameters:
      id - The identifier for the new tag.
      Returns:
      A newly instantiated Tag.