Interface NbtComponentSerializer

All Superinterfaces:
ComponentDecoder<BinaryTag, Component>, ComponentEncoder<Component, BinaryTag>, ComponentSerializer<Component, Component, BinaryTag>

public sealed interface NbtComponentSerializer extends ComponentSerializer<Component, Component, BinaryTag>
  • Method Details

    • nbt

      static NbtComponentSerializer nbt()
      Returns a serializer that looks up the server process registries on every operation, so it fails when used before the server process is initialized. Prefer nbt(Registries) when a registry context is available.
      Returns:
      the serializer
    • nbt

      static NbtComponentSerializer nbt(Registries registries)
      Returns a serializer bound to the given registry context.
      Parameters:
      registries - the registry context used to resolve registry references
      Returns:
      the serializer