Interface NbtElement

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

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

    • field_33246

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

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

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

      static final int field_33249
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official g Lrk;g:I
      intermediary field_33249 Lnet/minecraft/class_2520;field_33249:I
      named field_33249 Lnet/minecraft/nbt/NbtElement;field_33249: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
      official h Lrk;h:B
      intermediary field_33250 Lnet/minecraft/class_2520;field_33250:B
      named END_TYPE Lnet/minecraft/nbt/NbtElement;END_TYPE: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
      official i Lrk;i:B
      intermediary field_33251 Lnet/minecraft/class_2520;field_33251:B
      named BYTE_TYPE Lnet/minecraft/nbt/NbtElement;BYTE_TYPE: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
      official j Lrk;j:B
      intermediary field_33252 Lnet/minecraft/class_2520;field_33252:B
      named SHORT_TYPE Lnet/minecraft/nbt/NbtElement;SHORT_TYPE: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
      official k Lrk;k:B
      intermediary field_33253 Lnet/minecraft/class_2520;field_33253:B
      named INT_TYPE Lnet/minecraft/nbt/NbtElement;INT_TYPE: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
      official l Lrk;l:B
      intermediary field_33254 Lnet/minecraft/class_2520;field_33254:B
      named LONG_TYPE Lnet/minecraft/nbt/NbtElement;LONG_TYPE: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
      official m Lrk;m:B
      intermediary field_33255 Lnet/minecraft/class_2520;field_33255:B
      named FLOAT_TYPE Lnet/minecraft/nbt/NbtElement;FLOAT_TYPE: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
      official n Lrk;n:B
      intermediary field_33256 Lnet/minecraft/class_2520;field_33256:B
      named DOUBLE_TYPE Lnet/minecraft/nbt/NbtElement;DOUBLE_TYPE: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
      official o Lrk;o:B
      intermediary field_33257 Lnet/minecraft/class_2520;field_33257:B
      named BYTE_ARRAY_TYPE Lnet/minecraft/nbt/NbtElement;BYTE_ARRAY_TYPE: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
      official p Lrk;p:B
      intermediary field_33258 Lnet/minecraft/class_2520;field_33258:B
      named STRING_TYPE Lnet/minecraft/nbt/NbtElement;STRING_TYPE: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
      official q Lrk;q:B
      intermediary field_33259 Lnet/minecraft/class_2520;field_33259:B
      named LIST_TYPE Lnet/minecraft/nbt/NbtElement;LIST_TYPE: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
      official r Lrk;r:B
      intermediary field_33260 Lnet/minecraft/class_2520;field_33260:B
      named COMPOUND_TYPE Lnet/minecraft/nbt/NbtElement;COMPOUND_TYPE: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
      official s Lrk;s:B
      intermediary field_33261 Lnet/minecraft/class_2520;field_33261:B
      named INT_ARRAY_TYPE Lnet/minecraft/nbt/NbtElement;INT_ARRAY_TYPE: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
      official t Lrk;t:B
      intermediary field_33262 Lnet/minecraft/class_2520;field_33262:B
      named LONG_ARRAY_TYPE Lnet/minecraft/nbt/NbtElement;LONG_ARRAY_TYPE:B
    • NUMBER_TYPE

      static final byte NUMBER_TYPE
      A wildcard NBT numeric ID that can be used for checking whether an NBT element is an AbstractNbtNumber. Is 0x63.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official u Lrk;u:B
      intermediary field_33263 Lnet/minecraft/class_2520;field_33263:B
      named NUMBER_TYPE Lnet/minecraft/nbt/NbtElement;NUMBER_TYPE:B
    • MAX_DEPTH

      static final int MAX_DEPTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official v Lrk;v:I
      intermediary field_33264 Lnet/minecraft/class_2520;field_33264:I
      named MAX_DEPTH Lnet/minecraft/nbt/NbtElement;MAX_DEPTH: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.NbtCompound) instead.
      Mappings:
      Namespace Name Mixin selector
      official a Lrk;a(Ljava/io/DataOutput;)V
      intermediary method_10713 Lnet/minecraft/class_2520;method_10713(Ljava/io/DataOutput;)V
      named write Lnet/minecraft/nbt/NbtElement;write(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
      official b Lrk;b()B
      intermediary method_10711 Lnet/minecraft/class_2520;method_10711()B
      named getType Lnet/minecraft/nbt/NbtElement;getType()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
      official c Lrk;c()Lrm;
      intermediary method_23258 Lnet/minecraft/class_2520;method_23258()Lnet/minecraft/class_4614;
      named getNbtType Lnet/minecraft/nbt/NbtElement;getNbtType()Lnet/minecraft/nbt/NbtType;
    • 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
      official d Lrk;d()Lrk;
      intermediary method_10707 Lnet/minecraft/class_2520;method_10707()Lnet/minecraft/class_2520;
      named copy Lnet/minecraft/nbt/NbtElement;copy()Lnet/minecraft/nbt/NbtElement;
    • getSizeInBytes

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

      default String asString()
      Returns the NBT's string representation.
      Returns:
      the NBT's string representation
      Implementation Note:
      By default, this returns the same result as StringNbtWriter. NbtString will return its string value instead.
      Mappings:
      Namespace Name Mixin selector
      official l_ Lrk;l_()Ljava/lang/String;
      intermediary method_10714 Lnet/minecraft/class_2520;method_10714()Ljava/lang/String;
      named asString Lnet/minecraft/nbt/NbtElement;asString()Ljava/lang/String;
    • accept

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

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

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