Class StringNbt
Namespace: Void.Minecraft.Nbt.Snbt
Assembly: Void.Minecraft.dll
Provides static methods for parsing string-NBT (SNBT) source text into a complete
public static class StringNbtInheritance
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Parse(string)
Parse the given source text into a
public static CompoundTag Parse(string source)Parameters
source string
A string containing the SNBT code to parse.
Returns
The
Exceptions
When source is null.
When source is invalid SNBT code.
Parse(ReadOnlySpan<byte>, Encoding?)
Parse the given source text into a
public static CompoundTag Parse(ReadOnlySpan<byte> source, Encoding? encoding = null)Parameters
source ReadOnlySpan<byte>
A string containing the SNBT code to parse.
encoding Encoding?
Encoding of the source.
Returns
The
Exceptions
When source is null.
When source is invalid SNBT code.
ParseList(string)
Parse the given source text into a
public static ListTag ParseList(string source)Parameters
source string
A string containing the SNBT code to parse.
Returns
The
Exceptions
When source is null.
When source is invalid SNBT code.
ParseList(ReadOnlySpan<byte>, Encoding?)
Parse the given source text into a
public static ListTag ParseList(ReadOnlySpan<byte> source, Encoding? encoding = null)Parameters
source ReadOnlySpan<byte>
A string containing the SNBT code to parse.
encoding Encoding?
Encoding of the source.
Returns
The
Exceptions
When source is null.
When source is invalid SNBT code.