Class ComponentNbtSerializer
Namespace: Void.Minecraft.Components.Text.Serializers
Assembly: Void.Minecraft.dll
Converts Minecraft text components to and from their NBT representation.
public static class ComponentNbtSerializerInheritance
object ← ComponentNbtSerializer
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Deserialize(NbtTag)
Deserializes a text component from an NBT tag.
public static Component Deserialize(NbtTag tag)Parameters
tag NbtTag
A component compound, a compact string component, or an end tag.
Returns
The deserialized component; an end tag produces
Exceptions
The tag shape, required field, or field type is not supported.
Serialize(Component)
Serializes a component tree to an NBT compound using the modern component schema.
public static NbtCompound Serialize(Component component)Parameters
component Component
The component to serialize.
Returns
The serialized compound.
Exceptions
The component has an unsupported content implementation.