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 uy
  • 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 byteValue Lnet/minecraft/nbt/AbstractNbtNumber;byteValue()B
      intermediary method_10698 Lnet/minecraft/class_2514;method_10698()B
      official j Luy;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 shortValue Lnet/minecraft/nbt/AbstractNbtNumber;shortValue()S
      intermediary method_10696 Lnet/minecraft/class_2514;method_10696()S
      official i Luy;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 intValue Lnet/minecraft/nbt/AbstractNbtNumber;intValue()I
      intermediary method_10701 Lnet/minecraft/class_2514;method_10701()I
      official h Luy;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 longValue Lnet/minecraft/nbt/AbstractNbtNumber;longValue()J
      intermediary method_10699 Lnet/minecraft/class_2514;method_10699()J
      official g Luy;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 floatValue Lnet/minecraft/nbt/AbstractNbtNumber;floatValue()F
      intermediary method_10700 Lnet/minecraft/class_2514;method_10700()F
      official l Luy;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 doubleValue Lnet/minecraft/nbt/AbstractNbtNumber;doubleValue()D
      intermediary method_10697 Lnet/minecraft/class_2514;method_10697()D
      official k Luy;k()D
    • numberValue

      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 Luy;m()Ljava/lang/Number;
    • asNumber

      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 Lvi;o()Ljava/util/Optional;
    • asByte

      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 Lvi;p()Ljava/util/Optional;
    • asShort

      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 Lvi;q()Ljava/util/Optional;
    • asInt

      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 Lvi;r()Ljava/util/Optional;
    • asLong

      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 Lvi;s()Ljava/util/Optional;
    • asFloat

      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 Lvi;t()Ljava/util/Optional;
    • asDouble

      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 Lvi;u()Ljava/util/Optional;
    • asBoolean

      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 Lvi;v()Ljava/util/Optional;