Package net.minecraft.nbt
Class NbtLong
java.lang.Object
net.minecraft.nbt.AbstractNbtNumber
net.minecraft.nbt.NbtLong
- All Implemented Interfaces:
NbtElement
public class NbtLong extends AbstractNbtNumber
Represents an NBT 64-bit integer.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classNbtLong.Cache -
Field Summary
Fields inherited from interface net.minecraft.nbt.NbtElement
AQUA, GOLD, GREEN, RED -
Constructor Summary
Constructors Modifier Constructor Description privateNbtLong(long value) -
Method Summary
Modifier and Type Method Description bytebyteValue()Gets the value as an 8-bit integer.NbtLongcopy()Copies this NBT element.doubledoubleValue()Gets the value as a 64-bit floating-point number.booleanequals(Object o)floatfloatValue()Gets the value as a 32-bit floating-point number.NbtType<NbtLong>getNbtType()Gets the NBT type definition of this NBT element.bytegetType()Gets the type of this NBT element.inthashCode()intintValue()Gets the value as a 32-bit integer.longlongValue()Gets the value as a 64-bit integer.NumbernumberValue()Gets the value as a generic number.static NbtLongof(long value)shortshortValue()Gets the value as a 16-bit integer.StringtoString()TexttoText(String indent, int depth)voidwrite(DataOutput output)Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.nbt.NbtElement
asString, toText
-
Field Details
-
TYPE
-
value
private final long value
-
-
Constructor Details
-
NbtLong
private NbtLong(long value)
-
-
Method Details
-
of
-
write
- Throws:
IOException
-
getType
public byte getType()Gets the type of this NBT element.- Returns:
- the type
-
getNbtType
Gets the NBT type definition of this NBT element.- Returns:
- the element type definition
-
toString
- Specified by:
toStringin interfaceNbtElement- Overrides:
toStringin classObject
-
copy
Description copied from interface:NbtElementCopies this NBT element.- Returns:
- the copied element
-
equals
-
hashCode
public int hashCode() -
toText
-
longValue
public long longValue()Gets the value as a 64-bit integer.- Specified by:
longValuein classAbstractNbtNumber- Returns:
- the value as a long
-
intValue
public int intValue()Gets the value as a 32-bit integer.- Specified by:
intValuein classAbstractNbtNumber- Returns:
- the value as an int
-
shortValue
public short shortValue()Gets the value as a 16-bit integer.- Specified by:
shortValuein classAbstractNbtNumber- Returns:
- the value as a short
-
byteValue
public byte byteValue()Gets the value as an 8-bit integer.- Specified by:
byteValuein classAbstractNbtNumber- Returns:
- the value as a byte
-
doubleValue
public double doubleValue()Gets the value as a 64-bit floating-point number.- Specified by:
doubleValuein classAbstractNbtNumber- Returns:
- the value as a double
-
floatValue
public float floatValue()Gets the value as a 32-bit floating-point number.- Specified by:
floatValuein classAbstractNbtNumber- Returns:
- the value as a float
-
numberValue
Gets the value as a generic number.- Specified by:
numberValuein classAbstractNbtNumber- Returns:
- the value as a
Number
-