Skip to content

Class NbtByteArray

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

Represents an NBT byte-array tag.

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

Inheritance

objectNbtTagNbtByteArray

Implements

IEquatable<NbtTag>, IEquatable<NbtByteArray>

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

NbtByteArray(byte[])

Represents an NBT byte-array tag.

public NbtByteArray(byte[] Data)

Parameters

Data byte[]

The array retained by the tag.

Properties

Data

The array retained by the tag.

public byte[] Data { get; init; }

Property Value

byte[]

Methods

ToString()

Serializes this tag as SNBT.

public override string ToString()

Returns

string

The SNBT representation.

Operators

implicit operator NbtByteArray(ByteArrayTag)

Converts a SharpNBT byte-array tag while preserving its name and data.

public static implicit operator NbtByteArray(ByteArrayTag tag)

Parameters

tag ByteArrayTag

The source tag.

Returns

NbtByteArray

The converted tag.

implicit operator ByteArrayTag(NbtByteArray)

Converts to a SharpNBT byte-array tag while preserving the name and data.

public static implicit operator ByteArrayTag(NbtByteArray tag)

Parameters

tag NbtByteArray

The source tag.

Returns

ByteArrayTag

The converted tag.