Package net.minecraft.nbt
Class NbtLongArray
- All Implemented Interfaces:
- Iterable<NbtLong>,- Collection<NbtLong>,- List<NbtLong>,- SequencedCollection<NbtLong>,- NbtElement
Represents an NBT 64-bit integer array. This object is mutable and backed by
 
long[]. Its type is 0xc. Like Java arrays,
 accessing indices that are out of bounds will throw ArrayIndexOutOfBoundsException.
 The backing array can be obtained via getLongArray().- Mappings:
- Namespace - Name - named - net/minecraft/nbt/NbtLongArray- intermediary - net/minecraft/class_2501- official - tx
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intstatic final NbtType<NbtLongArray> private long[]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 SummaryConstructorsConstructorDescriptionNbtLongArray(long[] value) NbtLongArray(LongSet value) NbtLongArray(List<Long> value) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaccept(NbtElementVisitor visitor) voidbooleanaddElement(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) byteGets the type of element that this list holds.long[]Returns the underlying long array.Returns the NBT type definition of this NBT element.intbytegetType()Returns the type of this NBT element.inthashCode()method_10606(int int2, NbtLong nbtLong) remove(int int2) booleansetElement(int index, NbtElement element) Sets the element atindextoelement.intsize()private static long[]toString()voidwrite(DataOutput output) Writes the NBT element tooutput.Methods inherited from class net.minecraft.nbt.AbstractNbtListsetMethods 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, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, 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 - named - SIZE- Lnet/minecraft/nbt/NbtLongArray;SIZE:I- intermediary - field_41726- Lnet/minecraft/class_2501;field_41726:I- official - b- Ltx;b:I
 
- 
TYPE- Mappings:
- Namespace - Name - Mixin selector - named - TYPE- Lnet/minecraft/nbt/NbtLongArray;TYPE:Lnet/minecraft/nbt/NbtType;- intermediary - field_21040- Lnet/minecraft/class_2501;field_21040:Lnet/minecraft/class_4614;- official - a- Ltx;a:Lup;
 
- 
valueprivate long[] value- Mappings:
- Namespace - Name - Mixin selector - named - value- Lnet/minecraft/nbt/NbtLongArray;value:[J- intermediary - field_11552- Lnet/minecraft/class_2501;field_11552:[J- official - c- Ltx;c:[J
 
 
- 
- 
Constructor Details- 
NbtLongArraypublic NbtLongArray(long[] value) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/nbt/NbtLongArray;<init>([J)V- intermediary - <init>- Lnet/minecraft/class_2501;<init>([J)V- official - <init>- Ltx;<init>([J)V
 
- 
NbtLongArray- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/nbt/NbtLongArray;<init>(Lit/unimi/dsi/fastutil/longs/LongSet;)V- intermediary - <init>- Lnet/minecraft/class_2501;<init>(Lit/unimi/dsi/fastutil/longs/LongSet;)V- official - <init>- Ltx;<init>(Lit/unimi/dsi/fastutil/longs/LongSet;)V
 
- 
NbtLongArray- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/nbt/NbtLongArray;<init>(Ljava/util/List;)V- intermediary - <init>- Lnet/minecraft/class_2501;<init>(Ljava/util/List;)V- official - <init>- Ltx;<init>(Ljava/util/List;)V
 
 
- 
- 
Method Details- 
toArray- Mappings:
- Namespace - Name - Mixin selector - named - toArray- Lnet/minecraft/nbt/NbtLongArray;toArray(Ljava/util/List;)[J- intermediary - method_10617- Lnet/minecraft/class_2501;method_10617(Ljava/util/List;)[J- official - a- Ltx;a(Ljava/util/List;)[J
 
- 
writeWrites 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- Lun;a(Ljava/io/DataOutput;)V
 
- 
getSizeInBytespublic 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- Lun;a()I
 
- 
getTypepublic 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- Lun;b()B
 
- 
getNbtTypeReturns 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- Lun;c()Lup;
 
- 
toString- Specified by:
- toStringin interface- NbtElement
- Overrides:
- toStringin class- AbstractCollection<NbtLong>
 
- 
copyDescription copied from interface:NbtElementReturns 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/NbtLongArray;copy()Lnet/minecraft/nbt/NbtLongArray;- intermediary - method_10618- Lnet/minecraft/class_2501;method_10618()Lnet/minecraft/class_2501;- official - e- Ltx;e()Ltx;
 
- 
equals- Specified by:
- equalsin interface- Collection<NbtLong>
- Specified by:
- equalsin interface- List<NbtLong>
- Overrides:
- equalsin class- AbstractList<NbtLong>
- Mappings:
- Namespace - Name - Mixin selector - named - equals- Lnet/minecraft/nbt/NbtLongArray;equals(Ljava/lang/Object;)Z- intermediary - equals- Lnet/minecraft/class_2501;equals(Ljava/lang/Object;)Z- official - equals- Ltx;equals(Ljava/lang/Object;)Z
 
- 
hashCodepublic int hashCode()- Specified by:
- hashCodein interface- Collection<NbtLong>
- Specified by:
- hashCodein interface- List<NbtLong>
- Overrides:
- hashCodein class- AbstractList<NbtLong>
 
- 
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- Lun;a(Lur;)V
 
- 
getLongArraypublic long[] getLongArray()Returns the underlying long array.- Returns:
- the underlying long array
- API Note:
- This does not copy the array, so modifications to the returned array also apply to this NBT long array.
- Mappings:
- Namespace - Name - Mixin selector - named - getLongArray- Lnet/minecraft/nbt/NbtLongArray;getLongArray()[J- intermediary - method_10615- Lnet/minecraft/class_2501;method_10615()[J- official - g- Ltx;g()[J
 
- 
sizepublic int size()- Specified by:
- sizein interface- Collection<NbtLong>
- Specified by:
- sizein interface- List<NbtLong>
- Specified by:
- sizein class- AbstractCollection<NbtLong>
 
- 
get- Specified by:
- getin interface- List<NbtLong>
- Specified by:
- getin class- AbstractList<NbtLong>
- Mappings:
- Namespace - Name - Mixin selector - named - get- Lnet/minecraft/nbt/NbtLongArray;get(I)Lnet/minecraft/nbt/NbtLong;- intermediary - method_10616- Lnet/minecraft/class_2501;method_10616(I)Lnet/minecraft/class_2503;- official - a- Ltx;a(I)Lty;
 
- 
method_10606- Mappings:
- Namespace - Name - Mixin selector - named - method_10606- Lnet/minecraft/nbt/NbtLongArray;method_10606(ILnet/minecraft/nbt/NbtLong;)Lnet/minecraft/nbt/NbtLong;- intermediary - method_17810- Lnet/minecraft/class_2501;method_17810(ILnet/minecraft/class_2503;)Lnet/minecraft/class_2503;- official - a- Ltx;a(ILty;)Lty;
 
- 
add- Specified by:
- addin interface- List<NbtLong>
- Specified by:
- addin class- AbstractNbtList<NbtLong>
- Mappings:
- Namespace - Name - Mixin selector - named - add- Lnet/minecraft/nbt/NbtLongArray;add(ILnet/minecraft/nbt/NbtLong;)V- intermediary - method_17812- Lnet/minecraft/class_2501;method_17812(ILnet/minecraft/class_2503;)V- official - b- Ltx;b(ILty;)V
 
- 
setElementSets the element atindextoelement. Does nothing if the types were incompatible.- Specified by:
- setElementin class- AbstractNbtList<NbtLong>
- Returns:
- whether the element was actually set
- Mappings:
- Namespace - Name - Mixin selector - named - setElement- Lnet/minecraft/nbt/AbstractNbtList;setElement(ILnet/minecraft/nbt/NbtElement;)Z- intermediary - method_10535- Lnet/minecraft/class_2483;method_10535(ILnet/minecraft/class_2520;)Z- official - a- Ltp;a(ILun;)Z
 
- 
addElementInsertselementatindex. Does nothing if the types were incompatible.- Specified by:
- addElementin class- AbstractNbtList<NbtLong>
- Returns:
- whether the element was actually added
- Mappings:
- Namespace - Name - Mixin selector - named - addElement- Lnet/minecraft/nbt/AbstractNbtList;addElement(ILnet/minecraft/nbt/NbtElement;)Z- intermediary - method_10533- Lnet/minecraft/class_2483;method_10533(ILnet/minecraft/class_2520;)Z- official - b- Ltp;b(ILun;)Z
 
- 
remove- Specified by:
- removein interface- List<NbtLong>
- Specified by:
- removein class- AbstractNbtList<NbtLong>
- Mappings:
- Namespace - Name - Mixin selector - named - remove- Lnet/minecraft/nbt/NbtLongArray;remove(I)Lnet/minecraft/nbt/NbtLong;- intermediary - method_17811- Lnet/minecraft/class_2501;method_17811(I)Lnet/minecraft/class_2503;- official - b- Ltx;b(I)Lty;
 
- 
getHeldTypepublic byte getHeldType()Gets the type of element that this list holds.- Specified by:
- getHeldTypein class- AbstractNbtList<NbtLong>
- Returns:
- the type of element that this list holds
- Mappings:
- Namespace - Name - Mixin selector - named - getHeldType- Lnet/minecraft/nbt/AbstractNbtList;getHeldType()B- intermediary - method_10601- Lnet/minecraft/class_2483;method_10601()B- official - f- Ltp;f()B
 
- 
clearpublic void clear()- Specified by:
- clearin interface- Collection<NbtLong>
- Specified by:
- clearin interface- List<NbtLong>
- Overrides:
- clearin class- AbstractList<NbtLong>
 
- 
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- Lun;a(Luk;)Luk$b;
 
 
-