Package com.viaversion.nbt.tag
Class FloatTag
java.lang.Object
com.viaversion.nbt.tag.FloatTag
A tag containing a float.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyteasByte()Gets the byte value of this tag.doubleasDouble()Gets the double value of this tag.floatasFloat()Gets the float value of this tag.intasInt()Gets the int value of this tag.longasLong()Gets the long value of this tag.Returns the raw string representation of the value of this tag.shortasShort()Gets the short value of this tag.booleanintgetTagId()Returns the NBT tag id of this tag type, used in I/O.getValue()Deprecated.inthashCode()static FloatTagread(DataInput in, TagLimiter tagLimiter) toString()voidwrite(DataOutput out) Writes this tag to an output stream.
-
Field Details
-
ID
public static final int ID- See Also:
-
ZERO
-
-
Constructor Details
-
FloatTag
public FloatTag(float value) Creates a tag.- Parameters:
value- The value of the tag.
-
-
Method Details
-
read
- Throws:
IOException
-
getValue
Deprecated.useasFloat()Description copied from interface:NumberTagGets the number value of this tag. -
asRawString
Description copied from interface:TagReturns the raw string representation of the value of this tag. For SNBT, useSNBT.serialize(Tag).- Specified by:
asRawStringin interfaceTag- Returns:
- raw string representation of the value of this tag
-
write
Description copied from interface:TagWrites this tag to an output stream.- Specified by:
writein interfaceTag- Parameters:
out- data output to write to- Throws:
IOException- if an I/O error occurs
-
equals
-
hashCode
public int hashCode() -
asByte
public byte asByte()Description copied from interface:NumberTagGets the byte value of this tag. -
asShort
public short asShort()Description copied from interface:NumberTagGets the short value of this tag. -
asInt
public int asInt()Description copied from interface:NumberTagGets the int value of this tag. -
asLong
public long asLong()Description copied from interface:NumberTagGets the long value of this tag. -
asFloat
public float asFloat()Description copied from interface:NumberTagGets the float value of this tag. -
asDouble
public double asDouble()Description copied from interface:NumberTagGets the double value of this tag. -
getTagId
public int getTagId()Description copied from interface:TagReturns the NBT tag id of this tag type, used in I/O. -
toString
-
asFloat()