Class IntTag
java.lang.Object
com.viaversion.nbt.tag.IntTag
-
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 IntTagread(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:
-
-
Constructor Details
-
IntTag
public IntTag()Creates a tag. -
IntTag
public IntTag(int value) Creates a tag.- Parameters:
value- The value of the tag.
-
-
Method Details
-
read
- Throws:
IOException
-
getValue
-
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
-
asByte
-
asShort
-
asInt
-
asLong
-
asFloat
-
asDouble
-
getTagId
-
toString
-
asInt()