Class NbtByte
Namespace: Void.Minecraft.Nbt.Tags
Assembly: Void.Minecraft.dll
Represents an 8-bit NBT numeric tag, including the conventional boolean values zero and one.
public record NbtByte : NbtTag, IEquatable<NbtTag>, IEquatable<NbtByte>Inheritance
Implements
IEquatable<NbtTag>, IEquatable<NbtByte>
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
NbtByte(byte)
Represents an 8-bit NBT numeric tag, including the conventional boolean values zero and one.
public NbtByte(byte Value = 0)Parameters
Value byte
The stored byte.
NbtByte(bool)
Creates a byte tag containing one for true or zero for false.
public NbtByte(bool value)Parameters
value bool
The boolean value.
Properties
IsBool
Gets whether the value is zero or one and can therefore represent an NBT boolean.
public bool IsBool { get; }Property Value
IsFalse
Gets whether the value is zero.
public bool IsFalse { get; }Property Value
IsTrue
Gets whether the value is one.
public bool IsTrue { get; }Property Value
Value
The stored byte.
public byte Value { get; init; }Property Value
Methods
ToString()
Returns the byte tag serialized in stringified NBT (SNBT) format.
public override string ToString()Returns
The SNBT representation of this byte tag.
Operators
implicit operator NbtByte(ByteTag)
Converts a SharpNBT byte tag while preserving its name and value.
public static implicit operator NbtByte(ByteTag tag)Parameters
tag ByteTag
The source tag.
Returns
The converted tag.
implicit operator ByteTag(NbtByte)
Converts to a SharpNBT byte tag while preserving the name and value.
public static implicit operator ByteTag(NbtByte tag)Parameters
tag NbtByte
The source tag.
Returns
The converted tag.