Class NumberTag
java.lang.Object
org.moddingx.launcherlib.nbt.tag.NumberTag
- All Implemented Interfaces:
Tag
A numeric tag. Covers tag types
TagType.BYTE, TagType.SHORT, TagType.INT,
TagType.LONG, TagType.FLOAT and TagType.DOUBLE.-
Method Summary
Modifier and TypeMethodDescriptionbyteasByte()Gets the value of this tag as a byte.doubleasDouble()Gets the value of this tag as a double.floatasFloat()Gets the value of this tag as a float.intasInt()Gets the value of this tag as an integer.longasLong()Gets the value of this tag as a long.shortasShort()Gets the value of this tag as a short.copy()Makes a copy of this tag.static NumberTagcreateByte(int value) Creates a newNumberTagof typeTagType.BYTE.static NumberTagcreateDouble(double value) Creates a newNumberTagof typeTagType.DOUBLE.static NumberTagcreateFloat(float value) Creates a newNumberTagof typeTagType.FLOAT.static NumberTagcreateInt(int value) Creates a newNumberTagof typeTagType.INT.static NumberTagcreateLong(long value) Creates a newNumberTagof typeTagType.LONG.static NumberTagcreateShort(int value) Creates a newNumberTagof typeTagType.SHORT.booleaninthashCode()toString()type()Gets theTagTypefor this tag.value()Gets the value of this tag.
-
Method Details
-
type
-
copy
-
toString
-
asByte
public byte asByte()Gets the value of this tag as a byte. -
asShort
public short asShort()Gets the value of this tag as a short. -
asInt
public int asInt()Gets the value of this tag as an integer. -
asLong
public long asLong()Gets the value of this tag as a long. -
asFloat
public float asFloat()Gets the value of this tag as a float. -
asDouble
public double asDouble()Gets the value of this tag as a double. -
value
Gets the value of this tag. -
equals
-
hashCode
-
createByte
Creates a newNumberTagof typeTagType.BYTE. -
createShort
Creates a newNumberTagof typeTagType.SHORT. -
createInt
Creates a newNumberTagof typeTagType.INT. -
createLong
Creates a newNumberTagof typeTagType.LONG. -
createFloat
Creates a newNumberTagof typeTagType.FLOAT. -
createDouble
Creates a newNumberTagof typeTagType.DOUBLE.
-