Class NbtShort
Namespace: Void.Minecraft.Nbt.Tags
Assembly: Void.Minecraft.dll
Represents a signed 16-bit integer NBT tag.
public record NbtShort : NbtTag, IEquatable<NbtTag>, IEquatable<NbtShort>Inheritance
Implements
IEquatable<NbtTag>, IEquatable<NbtShort>
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
NbtShort(short)
Represents a signed 16-bit integer NBT tag.
public NbtShort(short Value)Parameters
Value short
The numeric value.
Properties
Value
The numeric value.
public short Value { get; init; }Property Value
Methods
ToString()
Serializes this tag as SNBT.
public override string ToString()Returns
The SNBT representation.
Operators
implicit operator NbtShort(ShortTag)
Converts a SharpNBT short tag while preserving its name and value.
public static implicit operator NbtShort(ShortTag tag)Parameters
tag ShortTag
The source tag.
Returns
The converted tag.
implicit operator ShortTag(NbtShort)
Converts to a SharpNBT short tag while preserving the name and value.
public static implicit operator ShortTag(NbtShort tag)Parameters
tag NbtShort
The source tag.
Returns
The converted tag.