Package net.minecraft.nbt
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 va
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
The numeric ID of an NBT byte array value.static final byte
The numeric ID of an NBT byte value.static final byte
The numeric ID of an NBT compound value.static final byte
The numeric ID of an NBT double value.static final byte
The numeric ID of an NBT end value.static final int
static final int
static final int
static final int
static final byte
The numeric ID of an NBT float value.static final byte
The numeric ID of an NBT integer array value.static final byte
The numeric ID of an NBT integer value.static final byte
The numeric ID of an NBT list value.static final byte
The numeric ID of an NBT long array value.static final byte
The numeric ID of an NBT long value.static final int
static final byte
The numeric ID of an NBT short value.static final byte
The numeric ID of an NBT string value. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept
(NbtScanner visitor) void
accept
(NbtElementVisitor visitor) asByte()
default Optional
<byte[]> default Optional
<NbtCompound> asDouble()
asFloat()
asInt()
default Optional
<int[]> asLong()
default Optional
<long[]> asNumber()
asShort()
asString()
copy()
Returns an NBT element of equal value that won't change with this element.doAccept
(NbtScanner visitor) NbtType
<?> Returns the NBT type definition of this NBT element.int
byte
getType()
Returns the type of this NBT element.toString()
void
write
(DataOutput output) Writes the NBT element tooutput
.
-
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
Lva;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
Lva;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
Lva;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
Lva;g:I
-
END_TYPE
static final byte END_TYPEThe 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
Lva;h:B
-
BYTE_TYPE
static final byte BYTE_TYPEThe 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
Lva;i:B
-
SHORT_TYPE
static final byte SHORT_TYPEThe 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
Lva;j:B
-
INT_TYPE
static final byte INT_TYPEThe 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
Lva;k:B
-
LONG_TYPE
static final byte LONG_TYPEThe 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
Lva;l:B
-
FLOAT_TYPE
static final byte FLOAT_TYPEThe 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
Lva;m:B
-
DOUBLE_TYPE
static final byte DOUBLE_TYPEThe 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
Lva;n:B
-
BYTE_ARRAY_TYPE
static final byte BYTE_ARRAY_TYPEThe 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
Lva;o:B
-
STRING_TYPE
static final byte STRING_TYPEThe 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
Lva;p:B
-
LIST_TYPE
static final byte LIST_TYPEThe 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
Lva;q:B
-
COMPOUND_TYPE
static final byte COMPOUND_TYPEThe 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
Lva;r:B
-
INT_ARRAY_TYPE
static final byte INT_ARRAY_TYPEThe 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
Lva;s:B
-
LONG_ARRAY_TYPE
static final byte LONG_ARRAY_TYPEThe 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
Lva;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
Lva;u:I
-
-
Method Details
-
write
Writes the NBT element tooutput
.- Throws:
IOException
- API Note:
- This is a low-level method for serializing NBT elements; consider using
NbtIo
,NbtOps
, orPacketByteBuf.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
Lva;a(Ljava/io/DataOutput;)V
-
toString
String toString() -
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
Lva;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
Lva;c()Lvc;
-
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
Lva;d()Lva;
-
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
Lva;a()I
-
accept
- 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
Lva;a(Lve;)V
-
doAccept
- 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
Lva;a(Lux;)Lux$b;
-
accept
- 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
Lva;b(Lux;)V
-
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_
Lva;p_()Ljava/util/Optional;
-
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
Lva;o()Ljava/util/Optional;
-
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
Lva;p()Ljava/util/Optional;
-
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
Lva;q()Ljava/util/Optional;
-
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
Lva;r()Ljava/util/Optional;
-
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
Lva;s()Ljava/util/Optional;
-
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
Lva;t()Ljava/util/Optional;
-
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
Lva;u()Ljava/util/Optional;
-
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
Lva;v()Ljava/util/Optional;
-
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
Lva;f()Ljava/util/Optional;
-
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_
Lva;q_()Ljava/util/Optional;
-
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_
Lva;r_()Ljava/util/Optional;
-
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_
Lva;s_()Ljava/util/Optional;
-
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_
Lva;t_()Ljava/util/Optional;
-