Class NbtString
Namespace: Void.Minecraft.Nbt.Tags
Assembly: Void.Minecraft.dll
Represents an NBT string tag.
public record NbtString : NbtTag, IEquatable<NbtTag>, IEquatable<NbtString>Inheritance
Implements
IEquatable<NbtTag>, IEquatable<NbtString>
Inherited Members
NbtTag.Name, NbtTag.Type, NbtTag.AsStream(NbtFormatOptions, bool), NbtTag.AsJsonNode(), NbtTag.ToString(), NbtTag.ToSnbt(), NbtTag.Parse(string), NbtTag.Parse(ReadOnlyMemory<byte>, out NbtTag, bool, NbtFormatOptions), NbtTag.Parse<T>(ReadOnlyMemory<byte>, out T, bool, NbtFormatOptions), NbtTag.ReadFrom<TBuffer>(ref TBuffer, bool), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
NbtString(string)
Represents an NBT string tag.
public NbtString(string Value)Parameters
Value string
The string value.
Properties
Value
The string value.
public string Value { get; init; }Property Value
Methods
ToString()
Serializes this tag as SNBT with quoting and escaping as required.
public override string ToString()Returns
The SNBT representation.
Operators
implicit operator NbtString(StringTag)
Converts a SharpNBT string tag while preserving its name and value.
public static implicit operator NbtString(StringTag tag)Parameters
tag StringTag
The source tag.
Returns
The converted tag.
implicit operator StringTag(NbtString)
Converts to a SharpNBT string tag while preserving the name and value.
public static implicit operator StringTag(NbtString tag)Parameters
tag NbtString
The source tag.
Returns
The converted tag.