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
named net/minecraft/nbt/NbtElement
intermediary net/minecraft/class_2520
official ux
  • 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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;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 Lux;t: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
      named NUMBER_TYPE Lnet/minecraft/nbt/NbtElement;NUMBER_TYPE:B
      intermediary field_33263 Lnet/minecraft/class_2520;field_33263:B
      official u Lux;u: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 v Lux;v: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 Lux;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 Lux;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 Lux;c()Luz;
    • 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 Lux;d()Lux;
    • 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 Lux;a()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
      named asString Lnet/minecraft/nbt/NbtElement;asString()Ljava/lang/String;
      intermediary method_10714 Lnet/minecraft/class_2520;method_10714()Ljava/lang/String;
      official s_ Lux;s_()Ljava/lang/String;
    • 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 Lux;a(Lvb;)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 Lux;a(Luu;)Luu$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 Lux;b(Luu;)V