Package net.minecraft.nbt
Class NbtByteArray
- All Implemented Interfaces:
- Iterable<NbtByte>,- Collection<NbtByte>,- List<NbtByte>,- NbtElement
Represents an NBT byte array. This object is mutable and backed by 
byte[].
 Its type is 0x7. Like Java arrays, accessing
 indices that are out of bounds will throw ArrayIndexOutOfBoundsException.
 The backing array can be obtained via getByteArray().- Mappings:
- Namespace - Name - official - qo- intermediary - net/minecraft/class_2479- named - net/minecraft/nbt/NbtByteArray
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intstatic final NbtType<NbtByteArray>private byte[]Fields inherited from class java.util.AbstractListmodCountFields inherited from interface net.minecraft.nbt.NbtElementBYTE_ARRAY_TYPE, BYTE_TYPE, COMPOUND_TYPE, DOUBLE_TYPE, END_TYPE, field_33246, field_33247, field_33248, field_33249, FLOAT_TYPE, INT_ARRAY_TYPE, INT_TYPE, LIST_TYPE, LONG_ARRAY_TYPE, LONG_TYPE, MAX_DEPTH, NUMBER_TYPE, SHORT_TYPE, STRING_TYPE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaccept(NbtElementVisitor visitor) booleanaddElement(int index, NbtElement element) Insertselementatindex.voidclear()copy()Returns an NBT element of equal value that won't change with this element.doAccept(NbtScanner visitor) booleanget(int int2) byte[]Returns the underlying byte array.byteGets the type of element that this list holds.Returns the NBT type definition of this NBT element.intbytegetType()Returns the type of this NBT element.inthashCode()voidmethod_10531(int int2, NbtByte nbtByte) method_10536(int int2) booleansetElement(int index, NbtElement element) Sets the element atindextoelement.intsize()private static byte[]toString()voidwrite(DataOutput output) Writes the NBT element tooutput.Methods inherited from class net.minecraft.nbt.AbstractNbtListadd, removeMethods inherited from class java.util.AbstractListadd, addAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollectionaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.ListaddAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayMethods inherited from interface net.minecraft.nbt.NbtElementaccept, asString
- 
Field Details- 
SIZEprivate static final int SIZE- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lqo;b:I- intermediary - field_41716- Lnet/minecraft/class_2479;field_41716:I- named - SIZE- Lnet/minecraft/nbt/NbtByteArray;SIZE:I
 
- 
TYPE- Mappings:
- Namespace - Name - Mixin selector - official - a- Lqo;a:Lrm;- intermediary - field_21024- Lnet/minecraft/class_2479;field_21024:Lnet/minecraft/class_4614;- named - TYPE- Lnet/minecraft/nbt/NbtByteArray;TYPE:Lnet/minecraft/nbt/NbtType;
 
- 
valueprivate byte[] value- Mappings:
- Namespace - Name - Mixin selector - official - c- Lqo;c:[B- intermediary - field_11493- Lnet/minecraft/class_2479;field_11493:[B- named - value- Lnet/minecraft/nbt/NbtByteArray;value:[B
 
 
- 
- 
Constructor Details- 
NbtByteArraypublic NbtByteArray(byte[] value) - Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lqo;<init>([B)V- intermediary - <init>- Lnet/minecraft/class_2479;<init>([B)V- named - <init>- Lnet/minecraft/nbt/NbtByteArray;<init>([B)V
 
- 
NbtByteArray- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lqo;<init>(Ljava/util/List;)V- intermediary - <init>- Lnet/minecraft/class_2479;<init>(Ljava/util/List;)V- named - <init>- Lnet/minecraft/nbt/NbtByteArray;<init>(Ljava/util/List;)V
 
 
- 
- 
Method Details- 
toArray- Mappings:
- Namespace - Name - Mixin selector - official - a- Lqo;a(Ljava/util/List;)[B- intermediary - method_10522- Lnet/minecraft/class_2479;method_10522(Ljava/util/List;)[B- named - toArray- Lnet/minecraft/nbt/NbtByteArray;toArray(Ljava/util/List;)[B
 
- 
writeWrites the NBT element tooutput.- Throws:
- IOException
- 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
 
- 
getSizeInBytespublic 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
 
- 
getTypepublic 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
 
- 
getNbtTypeReturns 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;
 
- 
toString- Specified by:
- toStringin interface- NbtElement
- Overrides:
- toStringin class- AbstractCollection<NbtByte>
 
- 
copyReturns 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;
 
- 
equals- Specified by:
- equalsin interface- Collection<NbtByte>
- Specified by:
- equalsin interface- List<NbtByte>
- Overrides:
- equalsin class- AbstractList<NbtByte>
- Mappings:
- Namespace - Name - Mixin selector - official - equals- Lqo;equals(Ljava/lang/Object;)Z- intermediary - equals- Lnet/minecraft/class_2479;equals(Ljava/lang/Object;)Z- named - equals- Lnet/minecraft/nbt/NbtByteArray;equals(Ljava/lang/Object;)Z
 
- 
hashCodepublic int hashCode()- Specified by:
- hashCodein interface- Collection<NbtByte>
- Specified by:
- hashCodein interface- List<NbtByte>
- Overrides:
- hashCodein class- AbstractList<NbtByte>
 
- 
accept- 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
 
- 
getByteArraypublic byte[] getByteArray()Returns the underlying byte array.- Returns:
- the underlying byte array
- API Note:
- This does not copy the array, so modifications to the returned array also apply to this NBT byte array.
- Mappings:
- Namespace - Name - Mixin selector - official - e- Lqo;e()[B- intermediary - method_10521- Lnet/minecraft/class_2479;method_10521()[B- named - getByteArray- Lnet/minecraft/nbt/NbtByteArray;getByteArray()[B
 
- 
sizepublic int size()- Specified by:
- sizein interface- Collection<NbtByte>
- Specified by:
- sizein interface- List<NbtByte>
- Specified by:
- sizein class- AbstractCollection<NbtByte>
 
- 
get- Specified by:
- getin interface- List<NbtByte>
- Specified by:
- getin class- AbstractList<NbtByte>
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lqo;a(I)Lqp;- intermediary - method_10523- Lnet/minecraft/class_2479;method_10523(I)Lnet/minecraft/class_2481;- named - get- Lnet/minecraft/nbt/NbtByteArray;get(I)Lnet/minecraft/nbt/NbtByte;
 
- 
set- Specified by:
- setin interface- List<NbtByte>
- Specified by:
- setin class- AbstractNbtList<NbtByte>
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lqo;a(ILqp;)Lqp;- intermediary - method_17803- Lnet/minecraft/class_2479;method_17803(ILnet/minecraft/class_2481;)Lnet/minecraft/class_2481;- named - set- Lnet/minecraft/nbt/NbtByteArray;set(ILnet/minecraft/nbt/NbtByte;)Lnet/minecraft/nbt/NbtByte;
 
- 
method_10531- Mappings:
- Namespace - Name - Mixin selector - official - b- Lqo;b(ILqp;)V- intermediary - method_17805- Lnet/minecraft/class_2479;method_17805(ILnet/minecraft/class_2481;)V- named - method_10531- Lnet/minecraft/nbt/NbtByteArray;method_10531(ILnet/minecraft/nbt/NbtByte;)V
 
- 
setElementSets the element atindextoelement. Does nothing if the types were incompatible.- Specified by:
- setElementin class- AbstractNbtList<NbtByte>
- Returns:
- whether the element was actually set
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lqq;a(ILrk;)Z- intermediary - method_10535- Lnet/minecraft/class_2483;method_10535(ILnet/minecraft/class_2520;)Z- named - setElement- Lnet/minecraft/nbt/AbstractNbtList;setElement(ILnet/minecraft/nbt/NbtElement;)Z
 
- 
addElementInsertselementatindex. Does nothing if the types were incompatible.- Specified by:
- addElementin class- AbstractNbtList<NbtByte>
- Returns:
- whether the element was actually added
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lqq;b(ILrk;)Z- intermediary - method_10533- Lnet/minecraft/class_2483;method_10533(ILnet/minecraft/class_2520;)Z- named - addElement- Lnet/minecraft/nbt/AbstractNbtList;addElement(ILnet/minecraft/nbt/NbtElement;)Z
 
- 
method_10536- Mappings:
- Namespace - Name - Mixin selector - official - b- Lqo;b(I)Lqp;- intermediary - method_17804- Lnet/minecraft/class_2479;method_17804(I)Lnet/minecraft/class_2481;- named - method_10536- Lnet/minecraft/nbt/NbtByteArray;method_10536(I)Lnet/minecraft/nbt/NbtByte;
 
- 
getHeldTypepublic byte getHeldType()Gets the type of element that this list holds.- Specified by:
- getHeldTypein class- AbstractNbtList<NbtByte>
- Returns:
- the type of element that this list holds
- Mappings:
- Namespace - Name - Mixin selector - official - f- Lqq;f()B- intermediary - method_10601- Lnet/minecraft/class_2483;method_10601()B- named - getHeldType- Lnet/minecraft/nbt/AbstractNbtList;getHeldType()B
 
- 
clearpublic void clear()- Specified by:
- clearin interface- Collection<NbtByte>
- Specified by:
- clearin interface- List<NbtByte>
- Overrides:
- clearin class- AbstractList<NbtByte>
 
- 
doAccept- 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;
 
 
-