Skip to content

Class NbtInt

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

Represents a signed 32-bit integer NBT tag.

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

Inheritance

objectNbtTagNbtInt

Implements

IEquatable<NbtTag>, IEquatable<NbtInt>

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

NbtInt(int)

Represents a signed 32-bit integer NBT tag.

public NbtInt(int Value)

Parameters

Value int

The numeric value.

Properties

Value

The numeric value.

public int Value { get; init; }

Property Value

int

Methods

ToString()

Serializes this tag as SNBT.

public override string ToString()

Returns

string

The SNBT representation.

Operators

implicit operator NbtInt(IntTag)

Converts a SharpNBT integer tag while preserving its name and value.

public static implicit operator NbtInt(IntTag tag)

Parameters

tag IntTag

The source tag.

Returns

NbtInt

The converted tag.

implicit operator IntTag(NbtInt)

Converts to a SharpNBT integer tag while preserving the name and value.

public static implicit operator IntTag(NbtInt tag)

Parameters

tag NbtInt

The source tag.

Returns

IntTag

The converted tag.