Interface AbstractNbtNumber

All Superinterfaces:
NbtElement, NbtPrimitive
All Known Implementing Classes:
NbtByte, NbtDouble, NbtFloat, NbtInt, NbtLong, NbtShort

public non-sealed interface AbstractNbtNumber extends NbtPrimitive
Represents an NBT number.
Mappings:
Namespace Name
named net/minecraft/nbt/AbstractNbtNumber
intermediary net/minecraft/class_2514
official uq
  • Method Details Link icon

    • byteValue Link icon

      byte byteValue()
      Gets the value as an 8-bit integer.
      Returns:
      the value as a byte
      Mappings:
      Namespace Name Mixin selector
      named byteValue Lnet/minecraft/nbt/AbstractNbtNumber;byteValue()B
      intermediary method_10698 Lnet/minecraft/class_2514;method_10698()B
      official j Luq;j()B
    • shortValue Link icon

      short shortValue()
      Gets the value as a 16-bit integer.
      Returns:
      the value as a short
      Mappings:
      Namespace Name Mixin selector
      named shortValue Lnet/minecraft/nbt/AbstractNbtNumber;shortValue()S
      intermediary method_10696 Lnet/minecraft/class_2514;method_10696()S
      official i Luq;i()S
    • intValue Link icon

      int intValue()
      Gets the value as a 32-bit integer.
      Returns:
      the value as an int
      Mappings:
      Namespace Name Mixin selector
      named intValue Lnet/minecraft/nbt/AbstractNbtNumber;intValue()I
      intermediary method_10701 Lnet/minecraft/class_2514;method_10701()I
      official h Luq;h()I
    • longValue Link icon

      long longValue()
      Gets the value as a 64-bit integer.
      Returns:
      the value as a long
      Mappings:
      Namespace Name Mixin selector
      named longValue Lnet/minecraft/nbt/AbstractNbtNumber;longValue()J
      intermediary method_10699 Lnet/minecraft/class_2514;method_10699()J
      official g Luq;g()J
    • floatValue Link icon

      float floatValue()
      Gets the value as a 32-bit floating-point number.
      Returns:
      the value as a float
      Mappings:
      Namespace Name Mixin selector
      named floatValue Lnet/minecraft/nbt/AbstractNbtNumber;floatValue()F
      intermediary method_10700 Lnet/minecraft/class_2514;method_10700()F
      official l Luq;l()F
    • doubleValue Link icon

      double doubleValue()
      Gets the value as a 64-bit floating-point number.
      Returns:
      the value as a double
      Mappings:
      Namespace Name Mixin selector
      named doubleValue Lnet/minecraft/nbt/AbstractNbtNumber;doubleValue()D
      intermediary method_10697 Lnet/minecraft/class_2514;method_10697()D
      official k Luq;k()D
    • numberValue Link icon

      Number numberValue()
      Gets the value as a generic number.
      Returns:
      the value as a Number
      Mappings:
      Namespace Name Mixin selector
      named numberValue Lnet/minecraft/nbt/AbstractNbtNumber;numberValue()Ljava/lang/Number;
      intermediary method_10702 Lnet/minecraft/class_2514;method_10702()Ljava/lang/Number;
      official m Luq;m()Ljava/lang/Number;
    • asNumber Link icon

      default Optional<Number> asNumber()
      Specified by:
      asNumber in interface NbtElement
      Mappings:
      Namespace Name Mixin selector
      named asNumber Lnet/minecraft/nbt/NbtElement;asNumber()Ljava/util/Optional;
      intermediary method_68599 Lnet/minecraft/class_2520;method_68599()Ljava/util/Optional;
      official o Lva;o()Ljava/util/Optional;
    • asByte Link icon

      default Optional<Byte> asByte()
      Specified by:
      asByte in interface NbtElement
      Mappings:
      Namespace Name Mixin selector
      named asByte Lnet/minecraft/nbt/NbtElement;asByte()Ljava/util/Optional;
      intermediary method_68600 Lnet/minecraft/class_2520;method_68600()Ljava/util/Optional;
      official p Lva;p()Ljava/util/Optional;
    • asShort Link icon

      default Optional<Short> asShort()
      Specified by:
      asShort in interface NbtElement
      Mappings:
      Namespace Name Mixin selector
      named asShort Lnet/minecraft/nbt/NbtElement;asShort()Ljava/util/Optional;
      intermediary method_68601 Lnet/minecraft/class_2520;method_68601()Ljava/util/Optional;
      official q Lva;q()Ljava/util/Optional;
    • asInt Link icon

      default Optional<Integer> asInt()
      Specified by:
      asInt in interface NbtElement
      Mappings:
      Namespace Name Mixin selector
      named asInt Lnet/minecraft/nbt/NbtElement;asInt()Ljava/util/Optional;
      intermediary method_68602 Lnet/minecraft/class_2520;method_68602()Ljava/util/Optional;
      official r Lva;r()Ljava/util/Optional;
    • asLong Link icon

      default Optional<Long> asLong()
      Specified by:
      asLong in interface NbtElement
      Mappings:
      Namespace Name Mixin selector
      named asLong Lnet/minecraft/nbt/NbtElement;asLong()Ljava/util/Optional;
      intermediary method_68603 Lnet/minecraft/class_2520;method_68603()Ljava/util/Optional;
      official s Lva;s()Ljava/util/Optional;
    • asFloat Link icon

      default Optional<Float> asFloat()
      Specified by:
      asFloat in interface NbtElement
      Mappings:
      Namespace Name Mixin selector
      named asFloat Lnet/minecraft/nbt/NbtElement;asFloat()Ljava/util/Optional;
      intermediary method_68604 Lnet/minecraft/class_2520;method_68604()Ljava/util/Optional;
      official t Lva;t()Ljava/util/Optional;
    • asDouble Link icon

      default Optional<Double> asDouble()
      Specified by:
      asDouble in interface NbtElement
      Mappings:
      Namespace Name Mixin selector
      named asDouble Lnet/minecraft/nbt/NbtElement;asDouble()Ljava/util/Optional;
      intermediary method_68605 Lnet/minecraft/class_2520;method_68605()Ljava/util/Optional;
      official u Lva;u()Ljava/util/Optional;
    • asBoolean Link icon

      default Optional<Boolean> asBoolean()
      Specified by:
      asBoolean in interface NbtElement
      Mappings:
      Namespace Name Mixin selector
      named asBoolean Lnet/minecraft/nbt/NbtElement;asBoolean()Ljava/util/Optional;
      intermediary method_68606 Lnet/minecraft/class_2520;method_68606()Ljava/util/Optional;
      official v Lva;v()Ljava/util/Optional;