Class NbtTag
Namespace: Void.Minecraft.Nbt
Assembly: Void.Minecraft.dll
public abstract record NbtTag : IEquatable<NbtTag>Inheritance
Derived
NbtByte, NbtByteArray, NbtCompound, NbtDouble, NbtEnd, NbtFloat, NbtInt, NbtIntArray, NbtList, NbtLong, NbtLongArray, NbtShort, NbtString, NbtTag<T>
Implements
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Properties
Name
public string? Name { get; set; }Property Value
Type
public NbtTagType Type { get; }Property Value
Methods
AsJsonNode()
public JsonNode AsJsonNode()Returns
AsStream(NbtFormatOptions, bool)
public MemoryStream AsStream(NbtFormatOptions formatOptions = NbtFormatOptions.BigEndian, bool writeName = true)Parameters
formatOptions NbtFormatOptions
writeName bool
Returns
Parse(string)
public static NbtTag Parse(string data)Parameters
data string
Returns
Parse(ReadOnlyMemory<byte>, out NbtTag, bool, NbtFormatOptions)
public static long Parse(ReadOnlyMemory<byte> data, out NbtTag result, bool readName = true, NbtFormatOptions formatOptions = NbtFormatOptions.BigEndian)Parameters
data ReadOnlyMemory<byte>
result NbtTag
readName bool
formatOptions NbtFormatOptions
Returns
Parse<T>(ReadOnlyMemory<byte>, out T, bool, NbtFormatOptions)
public static long Parse<T>(ReadOnlyMemory<byte> data, out T result, bool readName = true, NbtFormatOptions formatOptions = NbtFormatOptions.BigEndian) where T : NbtTagParameters
data ReadOnlyMemory<byte>
result T
readName bool
formatOptions NbtFormatOptions
Returns
Type Parameters
T
ReadFrom<TBuffer>(ref TBuffer, bool)
public static NbtTag ReadFrom<TBuffer>(ref TBuffer buffer, bool readName = true) where TBuffer : struct, IMinecraftBuffer<TBuffer>, allows ref structParameters
buffer TBuffer
readName bool
Returns
Type Parameters
TBuffer
ToSnbt()
protected string ToSnbt()Returns
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
A string that represents the current object.
Operators
implicit operator NbtTag(Tag)
public static implicit operator NbtTag(Tag tag)Parameters
tag Tag
Returns
implicit operator Tag(NbtTag)
public static implicit operator Tag(NbtTag tag)Parameters
tag NbtTag