Skip to content

Class NbtList

Namespace: Void.Minecraft.Nbt.Tags
Assembly: Void.Minecraft.dll

Represents a homogeneous ordered NBT tag sequence.

public record NbtList : NbtTag, IEquatable<NbtTag>, IEquatable<NbtList>

Inheritance

objectNbtTagNbtList

Implements

IEquatable<NbtTag>, IEquatable<NbtList>

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

NbtList(IEnumerable<NbtTag>, NbtTagType)

Represents a homogeneous ordered NBT tag sequence.

public NbtList(IEnumerable<NbtTag> Data, NbtTagType DataType)

Parameters

Data IEnumerable<NbtTag>

The child-tag sequence.

DataType NbtTagType

The declared type shared by the children.

Properties

Data

The child-tag sequence.

public IEnumerable<NbtTag> Data { get; init; }

Property Value

IEnumerable<NbtTag>

DataType

The declared type shared by the children.

public NbtTagType DataType { get; init; }

Property Value

NbtTagType

Methods

ToString()

Serializes this list as SNBT.

public override string ToString()

Returns

string

The SNBT representation.

Operators

implicit operator NbtList(ListTag)

Converts a SharpNBT list while preserving its name, child type, and child sequence.

public static implicit operator NbtList(ListTag tag)

Parameters

tag ListTag

The source tag.

Returns

NbtList

The converted list.

implicit operator ListTag(NbtList)

Converts to a SharpNBT list while preserving the name, child type, and child sequence.

public static implicit operator ListTag(NbtList tag)

Parameters

tag NbtList

The source tag.

Returns

ListTag

The converted list.