Interface NbtElement

All Known Subinterfaces:
AbstractNbtList, AbstractNbtNumber, NbtPrimitive
All Known Implementing Classes:
NbtByte, NbtByteArray, NbtCompound, NbtDouble, NbtEnd, NbtFloat, NbtInt, NbtIntArray, NbtList, NbtLong, NbtLongArray, NbtShort, NbtString

public interface NbtElement
Represents an NBT element.
Mappings:
Namespace Name
named net/minecraft/nbt/NbtElement
intermediary net/minecraft/class_2520
official vi
  • Field Details

    • field_33246

      static final int field_33246
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_33246 Lnet/minecraft/nbt/NbtElement;field_33246:I
      intermediary field_33246 Lnet/minecraft/class_2520;field_33246:I
      official d Lvi;d:I
    • field_33247

      static final int field_33247
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_33247 Lnet/minecraft/nbt/NbtElement;field_33247:I
      intermediary field_33247 Lnet/minecraft/class_2520;field_33247:I
      official e Lvi;e:I
    • field_33248

      static final int field_33248
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_33248 Lnet/minecraft/nbt/NbtElement;field_33248:I
      intermediary field_33248 Lnet/minecraft/class_2520;field_33248:I
      official f Lvi;f:I
    • field_33249

      static final int field_33249
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_33249 Lnet/minecraft/nbt/NbtElement;field_33249:I
      intermediary field_33249 Lnet/minecraft/class_2520;field_33249:I
      official g Lvi;g:I
    • END_TYPE

      static final byte END_TYPE
      The numeric ID of an NBT end value. Is 0x0.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named END_TYPE Lnet/minecraft/nbt/NbtElement;END_TYPE:B
      intermediary field_33250 Lnet/minecraft/class_2520;field_33250:B
      official h Lvi;h:B
    • BYTE_TYPE

      static final byte BYTE_TYPE
      The numeric ID of an NBT byte value. Is 0x1.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named BYTE_TYPE Lnet/minecraft/nbt/NbtElement;BYTE_TYPE:B
      intermediary field_33251 Lnet/minecraft/class_2520;field_33251:B
      official i Lvi;i:B
    • SHORT_TYPE

      static final byte SHORT_TYPE
      The numeric ID of an NBT short value. Is 0x2.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named SHORT_TYPE Lnet/minecraft/nbt/NbtElement;SHORT_TYPE:B
      intermediary field_33252 Lnet/minecraft/class_2520;field_33252:B
      official j Lvi;j:B
    • INT_TYPE

      static final byte INT_TYPE
      The numeric ID of an NBT integer value. Is 0x3.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named INT_TYPE Lnet/minecraft/nbt/NbtElement;INT_TYPE:B
      intermediary field_33253 Lnet/minecraft/class_2520;field_33253:B
      official k Lvi;k:B
    • LONG_TYPE

      static final byte LONG_TYPE
      The numeric ID of an NBT long value. Is 0x4.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named LONG_TYPE Lnet/minecraft/nbt/NbtElement;LONG_TYPE:B
      intermediary field_33254 Lnet/minecraft/class_2520;field_33254:B
      official l Lvi;l:B
    • FLOAT_TYPE

      static final byte FLOAT_TYPE
      The numeric ID of an NBT float value. Is 0x5.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named FLOAT_TYPE Lnet/minecraft/nbt/NbtElement;FLOAT_TYPE:B
      intermediary field_33255 Lnet/minecraft/class_2520;field_33255:B
      official m Lvi;m:B
    • DOUBLE_TYPE

      static final byte DOUBLE_TYPE
      The numeric ID of an NBT double value. Is 0x6.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named DOUBLE_TYPE Lnet/minecraft/nbt/NbtElement;DOUBLE_TYPE:B
      intermediary field_33256 Lnet/minecraft/class_2520;field_33256:B
      official n Lvi;n:B
    • BYTE_ARRAY_TYPE

      static final byte BYTE_ARRAY_TYPE
      The numeric ID of an NBT byte array value. Is 0x7.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named BYTE_ARRAY_TYPE Lnet/minecraft/nbt/NbtElement;BYTE_ARRAY_TYPE:B
      intermediary field_33257 Lnet/minecraft/class_2520;field_33257:B
      official o Lvi;o:B
    • STRING_TYPE

      static final byte STRING_TYPE
      The numeric ID of an NBT string value. Is 0x8.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named STRING_TYPE Lnet/minecraft/nbt/NbtElement;STRING_TYPE:B
      intermediary field_33258 Lnet/minecraft/class_2520;field_33258:B
      official p Lvi;p:B
    • LIST_TYPE

      static final byte LIST_TYPE
      The numeric ID of an NBT list value. Is 0x9.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named LIST_TYPE Lnet/minecraft/nbt/NbtElement;LIST_TYPE:B
      intermediary field_33259 Lnet/minecraft/class_2520;field_33259:B
      official q Lvi;q:B
    • COMPOUND_TYPE

      static final byte COMPOUND_TYPE
      The numeric ID of an NBT compound value. Is 0xa.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named COMPOUND_TYPE Lnet/minecraft/nbt/NbtElement;COMPOUND_TYPE:B
      intermediary field_33260 Lnet/minecraft/class_2520;field_33260:B
      official r Lvi;r:B
    • INT_ARRAY_TYPE

      static final byte INT_ARRAY_TYPE
      The numeric ID of an NBT integer array value. Is 0xb.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named INT_ARRAY_TYPE Lnet/minecraft/nbt/NbtElement;INT_ARRAY_TYPE:B
      intermediary field_33261 Lnet/minecraft/class_2520;field_33261:B
      official s Lvi;s:B
    • LONG_ARRAY_TYPE

      static final byte LONG_ARRAY_TYPE
      The numeric ID of an NBT long array value. Is 0xc.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named LONG_ARRAY_TYPE Lnet/minecraft/nbt/NbtElement;LONG_ARRAY_TYPE:B
      intermediary field_33262 Lnet/minecraft/class_2520;field_33262:B
      official t Lvi;t:B
    • MAX_DEPTH

      static final int MAX_DEPTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_DEPTH Lnet/minecraft/nbt/NbtElement;MAX_DEPTH:I
      intermediary field_33264 Lnet/minecraft/class_2520;field_33264:I
      official u Lvi;u:I
  • Method Details

    • write

      void write(DataOutput output) throws IOException
      Writes the NBT element to output.
      Throws:
      IOException
      API Note:
      This is a low-level method for serializing NBT elements; consider using NbtIo, NbtOps, or PacketByteBuf.writeNbt(net.minecraft.nbt.NbtElement) instead.
      Mappings:
      Namespace Name Mixin selector
      named write Lnet/minecraft/nbt/NbtElement;write(Ljava/io/DataOutput;)V
      intermediary method_10713 Lnet/minecraft/class_2520;method_10713(Ljava/io/DataOutput;)V
      official a Lvi;a(Ljava/io/DataOutput;)V
    • toString

      String toString()
      Overrides:
      toString in class Object
    • getType

      byte getType()
      Returns the type of this NBT element.
      Returns:
      the type of this NBT element
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/nbt/NbtElement;getType()B
      intermediary method_10711 Lnet/minecraft/class_2520;method_10711()B
      official b Lvi;b()B
    • getNbtType

      NbtType<?> getNbtType()
      Returns the NBT type definition of this NBT element.
      Returns:
      the NBT type definition of this NBT element
      Mappings:
      Namespace Name Mixin selector
      named getNbtType Lnet/minecraft/nbt/NbtElement;getNbtType()Lnet/minecraft/nbt/NbtType;
      intermediary method_23258 Lnet/minecraft/class_2520;method_23258()Lnet/minecraft/class_4614;
      official c Lvi;c()Lvk;
    • copy

      NbtElement copy()
      Returns an NBT element of equal value that won't change with this element.
      Returns:
      an NBT element of equal value that won't change with this element
      Mappings:
      Namespace Name Mixin selector
      named copy Lnet/minecraft/nbt/NbtElement;copy()Lnet/minecraft/nbt/NbtElement;
      intermediary method_10707 Lnet/minecraft/class_2520;method_10707()Lnet/minecraft/class_2520;
      official d Lvi;d()Lvi;
    • getSizeInBytes

      int getSizeInBytes()
      Mappings:
      Namespace Name Mixin selector
      named getSizeInBytes Lnet/minecraft/nbt/NbtElement;getSizeInBytes()I
      intermediary method_47988 Lnet/minecraft/class_2520;method_47988()I
      official a Lvi;a()I
    • accept

      void accept(NbtElementVisitor visitor)
      Mappings:
      Namespace Name Mixin selector
      named accept Lnet/minecraft/nbt/NbtElement;accept(Lnet/minecraft/nbt/visitor/NbtElementVisitor;)V
      intermediary method_32289 Lnet/minecraft/class_2520;method_32289(Lnet/minecraft/class_5627;)V
      official a Lvi;a(Lvm;)V
    • doAccept

      NbtScanner.Result doAccept(NbtScanner visitor)
      Mappings:
      Namespace Name Mixin selector
      named doAccept Lnet/minecraft/nbt/NbtElement;doAccept(Lnet/minecraft/nbt/scanner/NbtScanner;)Lnet/minecraft/nbt/scanner/NbtScanner$Result;
      intermediary method_39850 Lnet/minecraft/class_2520;method_39850(Lnet/minecraft/class_6836;)Lnet/minecraft/class_6836$class_6838;
      official a Lvi;a(Lvf;)Lvf$b;
    • accept

      default void accept(NbtScanner visitor)
      Mappings:
      Namespace Name Mixin selector
      named accept Lnet/minecraft/nbt/NbtElement;accept(Lnet/minecraft/nbt/scanner/NbtScanner;)V
      intermediary method_39876 Lnet/minecraft/class_2520;method_39876(Lnet/minecraft/class_6836;)V
      official b Lvi;b(Lvf;)V
    • asString

      default Optional<String> asString()
      Mappings:
      Namespace Name Mixin selector
      named asString Lnet/minecraft/nbt/NbtElement;asString()Ljava/util/Optional;
      intermediary method_68658 Lnet/minecraft/class_2520;method_68658()Ljava/util/Optional;
      official p_ Lvi;p_()Ljava/util/Optional;
    • asNumber

      default Optional<Number> asNumber()
      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()
      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()
      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()
      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()
      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()
      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()
      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()
      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;
    • asByteArray

      default Optional<byte[]> asByteArray()
      Mappings:
      Namespace Name Mixin selector
      named asByteArray Lnet/minecraft/nbt/NbtElement;asByteArray()Ljava/util/Optional;
      intermediary method_68559 Lnet/minecraft/class_2520;method_68559()Ljava/util/Optional;
      official f Lvi;f()Ljava/util/Optional;
    • asIntArray

      default Optional<int[]> asIntArray()
      Mappings:
      Namespace Name Mixin selector
      named asIntArray Lnet/minecraft/nbt/NbtElement;asIntArray()Ljava/util/Optional;
      intermediary method_68572 Lnet/minecraft/class_2520;method_68572()Ljava/util/Optional;
      official q_ Lvi;q_()Ljava/util/Optional;
    • asLongArray

      default Optional<long[]> asLongArray()
      Mappings:
      Namespace Name Mixin selector
      named asLongArray Lnet/minecraft/nbt/NbtElement;asLongArray()Ljava/util/Optional;
      intermediary method_68593 Lnet/minecraft/class_2520;method_68593()Ljava/util/Optional;
      official r_ Lvi;r_()Ljava/util/Optional;
    • asCompound

      default Optional<NbtCompound> asCompound()
      Mappings:
      Namespace Name Mixin selector
      named asCompound Lnet/minecraft/nbt/NbtElement;asCompound()Ljava/util/Optional;
      intermediary method_68571 Lnet/minecraft/class_2520;method_68571()Ljava/util/Optional;
      official s_ Lvi;s_()Ljava/util/Optional;
    • asNbtList

      default Optional<NbtList> asNbtList()
      Mappings:
      Namespace Name Mixin selector
      named asNbtList Lnet/minecraft/nbt/NbtElement;asNbtList()Ljava/util/Optional;
      intermediary method_68592 Lnet/minecraft/class_2520;method_68592()Ljava/util/Optional;
      official t_ Lvi;t_()Ljava/util/Optional;