Interface NbtComponentSerializer
- All Superinterfaces:
ComponentDecoder<BinaryTag, Component>, ComponentEncoder<Component, BinaryTag>, ComponentSerializer<Component, Component, BinaryTag>
public sealed interface NbtComponentSerializer
extends ComponentSerializer<Component, Component, BinaryTag>
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic NbtComponentSerializernbt()Returns a serializer that looks up the server process registries on every operation, so it fails when used before the server process is initialized.static NbtComponentSerializernbt(Registries registries) Returns a serializer bound to the given registry context.Methods inherited from interface ComponentSerializer
deserialize, deserializeOr, deserializeOrNull, serialize, serializeOr, serializeOrNull
-
Method Details
-
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. Prefernbt(Registries)when a registry context is available.- Returns:
- the serializer
-
nbt
Returns a serializer bound to the given registry context.- Parameters:
registries- the registry context used to resolve registry references- Returns:
- the serializer
-