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/NbtElementintermediary net/minecraft/class_2520official vp
-
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 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) 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.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 named field_33246Lnet/minecraft/nbt/NbtElement;field_33246:Iintermediary field_33246Lnet/minecraft/class_2520;field_33246:Iofficial dLvp;d:I
-
field_33247
static final int field_33247- See Also:
- Mappings:
Namespace Name Mixin selector named field_33247Lnet/minecraft/nbt/NbtElement;field_33247:Iintermediary field_33247Lnet/minecraft/class_2520;field_33247:Iofficial eLvp;e:I
-
field_33248
static final int field_33248- See Also:
- Mappings:
Namespace Name Mixin selector named field_33248Lnet/minecraft/nbt/NbtElement;field_33248:Iintermediary field_33248Lnet/minecraft/class_2520;field_33248:Iofficial fLvp;f:I
-
field_33249
static final int field_33249- See Also:
- Mappings:
Namespace Name Mixin selector named field_33249Lnet/minecraft/nbt/NbtElement;field_33249:Iintermediary field_33249Lnet/minecraft/class_2520;field_33249:Iofficial gLvp;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_TYPELnet/minecraft/nbt/NbtElement;END_TYPE:Bintermediary field_33250Lnet/minecraft/class_2520;field_33250:Bofficial hLvp;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_TYPELnet/minecraft/nbt/NbtElement;BYTE_TYPE:Bintermediary field_33251Lnet/minecraft/class_2520;field_33251:Bofficial iLvp;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_TYPELnet/minecraft/nbt/NbtElement;SHORT_TYPE:Bintermediary field_33252Lnet/minecraft/class_2520;field_33252:Bofficial jLvp;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_TYPELnet/minecraft/nbt/NbtElement;INT_TYPE:Bintermediary field_33253Lnet/minecraft/class_2520;field_33253:Bofficial kLvp;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_TYPELnet/minecraft/nbt/NbtElement;LONG_TYPE:Bintermediary field_33254Lnet/minecraft/class_2520;field_33254:Bofficial lLvp;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_TYPELnet/minecraft/nbt/NbtElement;FLOAT_TYPE:Bintermediary field_33255Lnet/minecraft/class_2520;field_33255:Bofficial mLvp;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_TYPELnet/minecraft/nbt/NbtElement;DOUBLE_TYPE:Bintermediary field_33256Lnet/minecraft/class_2520;field_33256:Bofficial nLvp;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_TYPELnet/minecraft/nbt/NbtElement;BYTE_ARRAY_TYPE:Bintermediary field_33257Lnet/minecraft/class_2520;field_33257:Bofficial oLvp;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_TYPELnet/minecraft/nbt/NbtElement;STRING_TYPE:Bintermediary field_33258Lnet/minecraft/class_2520;field_33258:Bofficial pLvp;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_TYPELnet/minecraft/nbt/NbtElement;LIST_TYPE:Bintermediary field_33259Lnet/minecraft/class_2520;field_33259:Bofficial qLvp;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_TYPELnet/minecraft/nbt/NbtElement;COMPOUND_TYPE:Bintermediary field_33260Lnet/minecraft/class_2520;field_33260:Bofficial rLvp;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_TYPELnet/minecraft/nbt/NbtElement;INT_ARRAY_TYPE:Bintermediary field_33261Lnet/minecraft/class_2520;field_33261:Bofficial sLvp;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_TYPELnet/minecraft/nbt/NbtElement;LONG_ARRAY_TYPE:Bintermediary field_33262Lnet/minecraft/class_2520;field_33262:Bofficial tLvp;t:B
-
MAX_DEPTH
static final int MAX_DEPTH- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_DEPTHLnet/minecraft/nbt/NbtElement;MAX_DEPTH:Iintermediary field_33264Lnet/minecraft/class_2520;field_33264:Iofficial uLvp;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 writeLnet/minecraft/nbt/NbtElement;write(Ljava/io/DataOutput;)Vintermediary method_10713Lnet/minecraft/class_2520;method_10713(Ljava/io/DataOutput;)Vofficial aLvp;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 getTypeLnet/minecraft/nbt/NbtElement;getType()Bintermediary method_10711Lnet/minecraft/class_2520;method_10711()Bofficial bLvp;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 getNbtTypeLnet/minecraft/nbt/NbtElement;getNbtType()Lnet/minecraft/nbt/NbtType;intermediary method_23258Lnet/minecraft/class_2520;method_23258()Lnet/minecraft/class_4614;official cLvp;c()Lvr;
-
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 copyLnet/minecraft/nbt/NbtElement;copy()Lnet/minecraft/nbt/NbtElement;intermediary method_10707Lnet/minecraft/class_2520;method_10707()Lnet/minecraft/class_2520;official dLvp;d()Lvp;
-
getSizeInBytes
int getSizeInBytes()- Mappings:
Namespace Name Mixin selector named getSizeInBytesLnet/minecraft/nbt/NbtElement;getSizeInBytes()Iintermediary method_47988Lnet/minecraft/class_2520;method_47988()Iofficial aLvp;a()I
-
accept
- Mappings:
Namespace Name Mixin selector named acceptLnet/minecraft/nbt/NbtElement;accept(Lnet/minecraft/nbt/visitor/NbtElementVisitor;)Vintermediary method_32289Lnet/minecraft/class_2520;method_32289(Lnet/minecraft/class_5627;)Vofficial aLvp;a(Lvt;)V
-
doAccept
- Mappings:
Namespace Name Mixin selector named doAcceptLnet/minecraft/nbt/NbtElement;doAccept(Lnet/minecraft/nbt/scanner/NbtScanner;)Lnet/minecraft/nbt/scanner/NbtScanner$Result;intermediary method_39850Lnet/minecraft/class_2520;method_39850(Lnet/minecraft/class_6836;)Lnet/minecraft/class_6836$class_6838;official aLvp;a(Lvm;)Lvm$b;
-
accept
- Mappings:
Namespace Name Mixin selector named acceptLnet/minecraft/nbt/NbtElement;accept(Lnet/minecraft/nbt/scanner/NbtScanner;)Vintermediary method_39876Lnet/minecraft/class_2520;method_39876(Lnet/minecraft/class_6836;)Vofficial bLvp;b(Lvm;)V
-
asString
- Mappings:
Namespace Name Mixin selector named asStringLnet/minecraft/nbt/NbtElement;asString()Ljava/util/Optional;intermediary method_68658Lnet/minecraft/class_2520;method_68658()Ljava/util/Optional;official r_Lvp;r_()Ljava/util/Optional;
-
asNumber
- Mappings:
Namespace Name Mixin selector named asNumberLnet/minecraft/nbt/NbtElement;asNumber()Ljava/util/Optional;intermediary method_68599Lnet/minecraft/class_2520;method_68599()Ljava/util/Optional;official oLvp;o()Ljava/util/Optional;
-
asByte
- Mappings:
Namespace Name Mixin selector named asByteLnet/minecraft/nbt/NbtElement;asByte()Ljava/util/Optional;intermediary method_68600Lnet/minecraft/class_2520;method_68600()Ljava/util/Optional;official pLvp;p()Ljava/util/Optional;
-
asShort
- Mappings:
Namespace Name Mixin selector named asShortLnet/minecraft/nbt/NbtElement;asShort()Ljava/util/Optional;intermediary method_68601Lnet/minecraft/class_2520;method_68601()Ljava/util/Optional;official qLvp;q()Ljava/util/Optional;
-
asInt
- Mappings:
Namespace Name Mixin selector named asIntLnet/minecraft/nbt/NbtElement;asInt()Ljava/util/Optional;intermediary method_68602Lnet/minecraft/class_2520;method_68602()Ljava/util/Optional;official rLvp;r()Ljava/util/Optional;
-
asLong
- Mappings:
Namespace Name Mixin selector named asLongLnet/minecraft/nbt/NbtElement;asLong()Ljava/util/Optional;intermediary method_68603Lnet/minecraft/class_2520;method_68603()Ljava/util/Optional;official sLvp;s()Ljava/util/Optional;
-
asFloat
- Mappings:
Namespace Name Mixin selector named asFloatLnet/minecraft/nbt/NbtElement;asFloat()Ljava/util/Optional;intermediary method_68604Lnet/minecraft/class_2520;method_68604()Ljava/util/Optional;official tLvp;t()Ljava/util/Optional;
-
asDouble
- Mappings:
Namespace Name Mixin selector named asDoubleLnet/minecraft/nbt/NbtElement;asDouble()Ljava/util/Optional;intermediary method_68605Lnet/minecraft/class_2520;method_68605()Ljava/util/Optional;official uLvp;u()Ljava/util/Optional;
-
asBoolean
- Mappings:
Namespace Name Mixin selector named asBooleanLnet/minecraft/nbt/NbtElement;asBoolean()Ljava/util/Optional;intermediary method_68606Lnet/minecraft/class_2520;method_68606()Ljava/util/Optional;official vLvp;v()Ljava/util/Optional;
-
asByteArray
- Mappings:
Namespace Name Mixin selector named asByteArrayLnet/minecraft/nbt/NbtElement;asByteArray()Ljava/util/Optional;intermediary method_68559Lnet/minecraft/class_2520;method_68559()Ljava/util/Optional;official fLvp;f()Ljava/util/Optional;
-
asIntArray
- Mappings:
Namespace Name Mixin selector named asIntArrayLnet/minecraft/nbt/NbtElement;asIntArray()Ljava/util/Optional;intermediary method_68572Lnet/minecraft/class_2520;method_68572()Ljava/util/Optional;official s_Lvp;s_()Ljava/util/Optional;
-
asLongArray
- Mappings:
Namespace Name Mixin selector named asLongArrayLnet/minecraft/nbt/NbtElement;asLongArray()Ljava/util/Optional;intermediary method_68593Lnet/minecraft/class_2520;method_68593()Ljava/util/Optional;official t_Lvp;t_()Ljava/util/Optional;
-
asCompound
- Mappings:
Namespace Name Mixin selector named asCompoundLnet/minecraft/nbt/NbtElement;asCompound()Ljava/util/Optional;intermediary method_68571Lnet/minecraft/class_2520;method_68571()Ljava/util/Optional;official u_Lvp;u_()Ljava/util/Optional;
-
asNbtList
- Mappings:
Namespace Name Mixin selector named asNbtListLnet/minecraft/nbt/NbtElement;asNbtList()Ljava/util/Optional;intermediary method_68592Lnet/minecraft/class_2520;method_68592()Ljava/util/Optional;official v_Lvp;v_()Ljava/util/Optional;
-