Class NbtFloat
- Namespace
- fNbt
- Assembly
- fNbt.dll
A tag containing a single-precision floating point number.
public sealed class NbtFloat : NbtTag, ICloneable
- Inheritance
-
NbtFloat
- Implements
- Inherited Members
Constructors
NbtFloat()
Creates an unnamed NbtFloat tag with the default value of 0f.
public NbtFloat()
NbtFloat(float)
Creates an unnamed NbtFloat tag with the given value.
public NbtFloat(float value)
Parameters
valuefloatValue to assign to this tag.
NbtFloat(string?)
Creates an NbtFloat tag with the given name and the default value of 0f.
public NbtFloat(string? tagName)
Parameters
tagNamestringName to assign to this tag. May be
null.
NbtFloat(string?, float)
Creates an NbtFloat tag with the given name and value.
public NbtFloat(string? tagName, float value)
Parameters
NbtFloat(NbtFloat)
Creates a copy of given NbtFloat tag.
public NbtFloat(NbtFloat other)
Parameters
otherNbtFloatTag to copy. May not be
null.
Exceptions
- ArgumentNullException
otherisnull.
Properties
TagType
Type of this tag (Float).
public override NbtTagType TagType { get; }
Property Value
Value
Value/payload of this tag (a single-precision floating point number).
public float Value { get; set; }
Property Value
Methods
Clone()
Creates a deep copy of this tag.
public override object Clone()
Returns
- object
A new NbtTag object that is a deep copy of this instance.