Package net.minecraft.nbt
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 intermediary net/minecraft/class_2520official rknamed net/minecraft/nbt/NbtElement
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteThe numeric ID of an NBT byte array value.static final byteThe numeric ID of an NBT byte value.static final byteThe numeric ID of an NBT compound value.static final byteThe numeric ID of an NBT double value.static final byteThe numeric ID of an NBT end value.static final intstatic final intstatic final intstatic final intstatic final byteThe numeric ID of an NBT float value.static final byteThe numeric ID of an NBT integer array value.static final byteThe numeric ID of an NBT integer value.static final byteThe numeric ID of an NBT list value.static final byteThe numeric ID of an NBT long array value.static final byteThe numeric ID of an NBT long value.static final intstatic final byteA wildcard NBT numeric ID that can be used for checking whether an NBT element is anAbstractNbtNumber.static final byteThe numeric ID of an NBT short value.static final byteThe numeric ID of an NBT string value. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaccept(NbtScanner visitor) voidaccept(NbtElementVisitor visitor) default StringasString()Returns the NBT's string representation.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.intbytegetType()Returns the type of this NBT element.toString()voidwrite(DataOutput output) Writes the NBT element tooutput.
-
Field Details
-
field_33246
static final int field_33246- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33246Lnet/minecraft/class_2520;field_33246:Iofficial dLrk;d:Inamed field_33246Lnet/minecraft/nbt/NbtElement;field_33246:I
-
field_33247
static final int field_33247- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33247Lnet/minecraft/class_2520;field_33247:Iofficial eLrk;e:Inamed field_33247Lnet/minecraft/nbt/NbtElement;field_33247:I
-
field_33248
static final int field_33248- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33248Lnet/minecraft/class_2520;field_33248:Iofficial fLrk;f:Inamed field_33248Lnet/minecraft/nbt/NbtElement;field_33248:I
-
field_33249
static final int field_33249- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33249Lnet/minecraft/class_2520;field_33249:Iofficial gLrk;g:Inamed field_33249Lnet/minecraft/nbt/NbtElement;field_33249:I
-
END_TYPE
static final byte END_TYPEThe numeric ID of an NBT end value. Is 0x0.- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33250Lnet/minecraft/class_2520;field_33250:Bofficial hLrk;h:Bnamed END_TYPELnet/minecraft/nbt/NbtElement;END_TYPE:B
-
BYTE_TYPE
static final byte BYTE_TYPEThe numeric ID of an NBT byte value. Is 0x1.- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33251Lnet/minecraft/class_2520;field_33251:Bofficial iLrk;i:Bnamed BYTE_TYPELnet/minecraft/nbt/NbtElement;BYTE_TYPE:B
-
SHORT_TYPE
static final byte SHORT_TYPEThe numeric ID of an NBT short value. Is 0x2.- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33252Lnet/minecraft/class_2520;field_33252:Bofficial jLrk;j:Bnamed SHORT_TYPELnet/minecraft/nbt/NbtElement;SHORT_TYPE:B
-
INT_TYPE
static final byte INT_TYPEThe numeric ID of an NBT integer value. Is 0x3.- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33253Lnet/minecraft/class_2520;field_33253:Bofficial kLrk;k:Bnamed INT_TYPELnet/minecraft/nbt/NbtElement;INT_TYPE:B
-
LONG_TYPE
static final byte LONG_TYPEThe numeric ID of an NBT long value. Is 0x4.- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33254Lnet/minecraft/class_2520;field_33254:Bofficial lLrk;l:Bnamed LONG_TYPELnet/minecraft/nbt/NbtElement;LONG_TYPE:B
-
FLOAT_TYPE
static final byte FLOAT_TYPEThe numeric ID of an NBT float value. Is 0x5.- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33255Lnet/minecraft/class_2520;field_33255:Bofficial mLrk;m:Bnamed FLOAT_TYPELnet/minecraft/nbt/NbtElement;FLOAT_TYPE:B
-
DOUBLE_TYPE
static final byte DOUBLE_TYPEThe numeric ID of an NBT double value. Is 0x6.- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33256Lnet/minecraft/class_2520;field_33256:Bofficial nLrk;n:Bnamed DOUBLE_TYPELnet/minecraft/nbt/NbtElement;DOUBLE_TYPE: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 intermediary field_33257Lnet/minecraft/class_2520;field_33257:Bofficial oLrk;o:Bnamed BYTE_ARRAY_TYPELnet/minecraft/nbt/NbtElement;BYTE_ARRAY_TYPE:B
-
STRING_TYPE
static final byte STRING_TYPEThe numeric ID of an NBT string value. Is 0x8.- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33258Lnet/minecraft/class_2520;field_33258:Bofficial pLrk;p:Bnamed STRING_TYPELnet/minecraft/nbt/NbtElement;STRING_TYPE:B
-
LIST_TYPE
static final byte LIST_TYPEThe numeric ID of an NBT list value. Is 0x9.- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33259Lnet/minecraft/class_2520;field_33259:Bofficial qLrk;q:Bnamed LIST_TYPELnet/minecraft/nbt/NbtElement;LIST_TYPE:B
-
COMPOUND_TYPE
static final byte COMPOUND_TYPEThe numeric ID of an NBT compound value. Is 0xa.- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33260Lnet/minecraft/class_2520;field_33260:Bofficial rLrk;r:Bnamed COMPOUND_TYPELnet/minecraft/nbt/NbtElement;COMPOUND_TYPE: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 intermediary field_33261Lnet/minecraft/class_2520;field_33261:Bofficial sLrk;s:Bnamed INT_ARRAY_TYPELnet/minecraft/nbt/NbtElement;INT_ARRAY_TYPE: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 intermediary field_33262Lnet/minecraft/class_2520;field_33262:Bofficial tLrk;t:Bnamed LONG_ARRAY_TYPELnet/minecraft/nbt/NbtElement;LONG_ARRAY_TYPE:B
-
NUMBER_TYPE
static final byte NUMBER_TYPEA wildcard NBT numeric ID that can be used for checking whether an NBT element is anAbstractNbtNumber. Is 0x63.- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33263Lnet/minecraft/class_2520;field_33263:Bofficial uLrk;u:Bnamed NUMBER_TYPELnet/minecraft/nbt/NbtElement;NUMBER_TYPE:B
-
MAX_DEPTH
static final int MAX_DEPTH- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33264Lnet/minecraft/class_2520;field_33264:Iofficial vLrk;v:Inamed MAX_DEPTHLnet/minecraft/nbt/NbtElement;MAX_DEPTH: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.NbtCompound)instead. - Mappings:
Namespace Name Mixin selector intermediary method_10713Lnet/minecraft/class_2520;method_10713(Ljava/io/DataOutput;)Vofficial aLrk;a(Ljava/io/DataOutput;)Vnamed writeLnet/minecraft/nbt/NbtElement;write(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 intermediary method_10711Lnet/minecraft/class_2520;method_10711()Bofficial bLrk;b()Bnamed getTypeLnet/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 intermediary method_23258Lnet/minecraft/class_2520;method_23258()Lnet/minecraft/class_4614;official cLrk;c()Lrm;named getNbtTypeLnet/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 intermediary method_10707Lnet/minecraft/class_2520;method_10707()Lnet/minecraft/class_2520;official dLrk;d()Lrk;named copyLnet/minecraft/nbt/NbtElement;copy()Lnet/minecraft/nbt/NbtElement;
-
getSizeInBytes
int getSizeInBytes()- Mappings:
Namespace Name Mixin selector intermediary method_47988Lnet/minecraft/class_2520;method_47988()Iofficial aLrk;a()Inamed getSizeInBytesLnet/minecraft/nbt/NbtElement;getSizeInBytes()I
-
asString
Returns the NBT's string representation.- Returns:
- the NBT's string representation
- Implementation Note:
- By default, this returns the same result as
StringNbtWriter.NbtStringwill return its string value instead. - Mappings:
Namespace Name Mixin selector intermediary method_10714Lnet/minecraft/class_2520;method_10714()Ljava/lang/String;official l_Lrk;l_()Ljava/lang/String;named asStringLnet/minecraft/nbt/NbtElement;asString()Ljava/lang/String;
-
accept
- Mappings:
Namespace Name Mixin selector intermediary method_32289Lnet/minecraft/class_2520;method_32289(Lnet/minecraft/class_5627;)Vofficial aLrk;a(Lro;)Vnamed acceptLnet/minecraft/nbt/NbtElement;accept(Lnet/minecraft/nbt/visitor/NbtElementVisitor;)V
-
doAccept
- Mappings:
Namespace Name Mixin selector intermediary method_39850Lnet/minecraft/class_2520;method_39850(Lnet/minecraft/class_6836;)Lnet/minecraft/class_6836$class_6838;official aLrk;a(Lrh;)Lrh$b;named doAcceptLnet/minecraft/nbt/NbtElement;doAccept(Lnet/minecraft/nbt/scanner/NbtScanner;)Lnet/minecraft/nbt/scanner/NbtScanner$Result;
-
accept
- Mappings:
Namespace Name Mixin selector intermediary method_39876Lnet/minecraft/class_2520;method_39876(Lnet/minecraft/class_6836;)Vofficial bLrk;b(Lrh;)Vnamed acceptLnet/minecraft/nbt/NbtElement;accept(Lnet/minecraft/nbt/scanner/NbtScanner;)V
-