Skip to content

Class NbtFloat

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

Represents a single-precision floating-point NBT tag.

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

Inheritance

objectNbtTagNbtFloat

Implements

IEquatable<NbtTag>, IEquatable<NbtFloat>

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

NbtFloat(float)

Represents a single-precision floating-point NBT tag.

public NbtFloat(float Value)

Parameters

Value float

The numeric value.

Properties

Value

The numeric value.

public float Value { get; init; }

Property Value

float

Methods

ToString()

Serializes this tag as SNBT.

public override string ToString()

Returns

string

The SNBT representation.

Operators

implicit operator NbtFloat(FloatTag)

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

public static implicit operator NbtFloat(FloatTag tag)

Parameters

tag FloatTag

The source tag.

Returns

NbtFloat

The converted tag.

implicit operator FloatTag(NbtFloat)

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

public static implicit operator FloatTag(NbtFloat tag)

Parameters

tag NbtFloat

The source tag.

Returns

FloatTag

The converted tag.