Package net.minecraft.nbt
Interface AbstractNbtNumber
- All Superinterfaces:
NbtElement,NbtPrimitive
Represents an NBT number.
The type
can be used to
check for the existence of any numeric element in a NBT compound object.invalid reference
NUMBER_TYPE
- Mappings:
Namespace Name named net/minecraft/nbt/AbstractNbtNumberintermediary net/minecraft/class_2514official up
-
Field Summary
Fields inherited from interface net.minecraft.nbt.NbtElement
BYTE_ARRAY_TYPE, BYTE_TYPE, COMPOUND_TYPE, DOUBLE_TYPE, END_TYPE, field_33246, field_33247, field_33248, field_33249, FLOAT_TYPE, INT_ARRAY_TYPE, INT_TYPE, LIST_TYPE, LONG_ARRAY_TYPE, LONG_TYPE, MAX_DEPTH, SHORT_TYPE, STRING_TYPE -
Method Summary
Modifier and TypeMethodDescriptionbyteGets the value as an 8-bit integer.doubleGets the value as a 64-bit floating-point number.floatGets the value as a 32-bit floating-point number.intintValue()Gets the value as a 32-bit integer.longGets the value as a 64-bit integer.Gets the value as a generic number.shortGets the value as a 16-bit integer.Methods inherited from interface net.minecraft.nbt.NbtElement
accept, accept, castToByteArray, castToIntArray, castToLongArray, castToNbtCompound, castToNbtList, castToString, doAccept, getNbtType, getSizeInBytes, getType, toString, writeMethods inherited from interface net.minecraft.nbt.NbtPrimitive
copy
-
Method Details
-
byteValue
byte byteValue()Gets the value as an 8-bit integer.- Returns:
- the value as a byte
- Mappings:
Namespace Name Mixin selector named byteValueLnet/minecraft/nbt/AbstractNbtNumber;byteValue()Bintermediary method_10698Lnet/minecraft/class_2514;method_10698()Bofficial jLup;j()B
-
shortValue
short shortValue()Gets the value as a 16-bit integer.- Returns:
- the value as a short
- Mappings:
Namespace Name Mixin selector named shortValueLnet/minecraft/nbt/AbstractNbtNumber;shortValue()Sintermediary method_10696Lnet/minecraft/class_2514;method_10696()Sofficial iLup;i()S
-
intValue
int intValue()Gets the value as a 32-bit integer.- Returns:
- the value as an int
- Mappings:
Namespace Name Mixin selector named intValueLnet/minecraft/nbt/AbstractNbtNumber;intValue()Iintermediary method_10701Lnet/minecraft/class_2514;method_10701()Iofficial hLup;h()I
-
longValue
long longValue()Gets the value as a 64-bit integer.- Returns:
- the value as a long
- Mappings:
Namespace Name Mixin selector named longValueLnet/minecraft/nbt/AbstractNbtNumber;longValue()Jintermediary method_10699Lnet/minecraft/class_2514;method_10699()Jofficial gLup;g()J
-
floatValue
float floatValue()Gets the value as a 32-bit floating-point number.- Returns:
- the value as a float
- Mappings:
Namespace Name Mixin selector named floatValueLnet/minecraft/nbt/AbstractNbtNumber;floatValue()Fintermediary method_10700Lnet/minecraft/class_2514;method_10700()Fofficial lLup;l()F
-
doubleValue
double doubleValue()Gets the value as a 64-bit floating-point number.- Returns:
- the value as a double
- Mappings:
Namespace Name Mixin selector named doubleValueLnet/minecraft/nbt/AbstractNbtNumber;doubleValue()Dintermediary method_10697Lnet/minecraft/class_2514;method_10697()Dofficial kLup;k()D
-
numberValue
Number numberValue()Gets the value as a generic number.- Returns:
- the value as a
Number - Mappings:
Namespace Name Mixin selector named numberValueLnet/minecraft/nbt/AbstractNbtNumber;numberValue()Ljava/lang/Number;intermediary method_10702Lnet/minecraft/class_2514;method_10702()Ljava/lang/Number;official mLup;m()Ljava/lang/Number;
-
castToNumber
- Specified by:
castToNumberin interfaceNbtElement- Mappings:
Namespace Name Mixin selector named castToNumberLnet/minecraft/nbt/NbtElement;castToNumber()Ljava/util/Optional;intermediary method_68599Lnet/minecraft/class_2520;method_68599()Ljava/util/Optional;official oLuy;o()Ljava/util/Optional;
-
castToByte
- Specified by:
castToBytein interfaceNbtElement- Mappings:
Namespace Name Mixin selector named castToByteLnet/minecraft/nbt/NbtElement;castToByte()Ljava/util/Optional;intermediary method_68600Lnet/minecraft/class_2520;method_68600()Ljava/util/Optional;official pLuy;p()Ljava/util/Optional;
-
castToShort
- Specified by:
castToShortin interfaceNbtElement- Mappings:
Namespace Name Mixin selector named castToShortLnet/minecraft/nbt/NbtElement;castToShort()Ljava/util/Optional;intermediary method_68601Lnet/minecraft/class_2520;method_68601()Ljava/util/Optional;official qLuy;q()Ljava/util/Optional;
-
castToInt
- Specified by:
castToIntin interfaceNbtElement- Mappings:
Namespace Name Mixin selector named castToIntLnet/minecraft/nbt/NbtElement;castToInt()Ljava/util/Optional;intermediary method_68602Lnet/minecraft/class_2520;method_68602()Ljava/util/Optional;official rLuy;r()Ljava/util/Optional;
-
castToLong
- Specified by:
castToLongin interfaceNbtElement- Mappings:
Namespace Name Mixin selector named castToLongLnet/minecraft/nbt/NbtElement;castToLong()Ljava/util/Optional;intermediary method_68603Lnet/minecraft/class_2520;method_68603()Ljava/util/Optional;official sLuy;s()Ljava/util/Optional;
-
castToFloat
- Specified by:
castToFloatin interfaceNbtElement- Mappings:
Namespace Name Mixin selector named castToFloatLnet/minecraft/nbt/NbtElement;castToFloat()Ljava/util/Optional;intermediary method_68604Lnet/minecraft/class_2520;method_68604()Ljava/util/Optional;official tLuy;t()Ljava/util/Optional;
-
castToDouble
- Specified by:
castToDoublein interfaceNbtElement- Mappings:
Namespace Name Mixin selector named castToDoubleLnet/minecraft/nbt/NbtElement;castToDouble()Ljava/util/Optional;intermediary method_68605Lnet/minecraft/class_2520;method_68605()Ljava/util/Optional;official uLuy;u()Ljava/util/Optional;
-
castToBoolean
- Specified by:
castToBooleanin interfaceNbtElement- Mappings:
Namespace Name Mixin selector named castToBooleanLnet/minecraft/nbt/NbtElement;castToBoolean()Ljava/util/Optional;intermediary method_68606Lnet/minecraft/class_2520;method_68606()Ljava/util/Optional;official vLuy;v()Ljava/util/Optional;
-