Package net.minecraft.nbt
Class NbtIntArray
- All Implemented Interfaces:
Iterable<NbtInt>,Collection<NbtInt>,List<NbtInt>,SequencedCollection<NbtInt>,NbtElement
Represents an NBT 32-bit integer array. This object is mutable and backed by
int[]. Its type is 0xb. Like Java arrays,
accessing indices that are out of bounds will throw ArrayIndexOutOfBoundsException.
The backing array can be obtained via getIntArray().- Mappings:
Namespace Name named net/minecraft/nbt/NbtIntArrayintermediary net/minecraft/class_2495official uf
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intstatic final NbtType<NbtIntArray> private int[]Fields inherited from class java.util.AbstractList
modCountFields inherited from interface net.minecraft.nbt.NbtElement
BYTE_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 Summary
Constructors -
Method Summary
Modifier 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.int[]Returns the underlying int array.Returns the NBT type definition of this NBT element.intbytegetType()Returns the type of this NBT element.inthashCode()remove(int int2) booleansetElement(int index, NbtElement element) Sets the element atindextoelement.intsize()private static int[]toString()voidwrite(DataOutput output) Writes the NBT element tooutput.Methods inherited from class java.util.AbstractList
add, addAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArrayMethods inherited from interface net.minecraft.nbt.NbtElement
accept, asString
-
Field Details
-
SIZE
private static final int SIZE- See Also:
- Mappings:
Namespace Name Mixin selector named SIZELnet/minecraft/nbt/NbtIntArray;SIZE:Iintermediary field_41723Lnet/minecraft/class_2495;field_41723:Iofficial bLuf;b:I
-
TYPE
- Mappings:
Namespace Name Mixin selector named TYPELnet/minecraft/nbt/NbtIntArray;TYPE:Lnet/minecraft/nbt/NbtType;intermediary field_21036Lnet/minecraft/class_2495;field_21036:Lnet/minecraft/class_4614;official aLuf;a:Lva;
-
value
private int[] value- Mappings:
Namespace Name Mixin selector named valueLnet/minecraft/nbt/NbtIntArray;value:[Iintermediary field_11524Lnet/minecraft/class_2495;field_11524:[Iofficial cLuf;c:[I
-
-
Constructor Details
-
NbtIntArray
public NbtIntArray(int[] value) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/nbt/NbtIntArray;<init>([I)Vintermediary <init>Lnet/minecraft/class_2495;<init>([I)Vofficial <init>Luf;<init>([I)V
-
NbtIntArray
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/nbt/NbtIntArray;<init>(Ljava/util/List;)Vintermediary <init>Lnet/minecraft/class_2495;<init>(Ljava/util/List;)Vofficial <init>Luf;<init>(Ljava/util/List;)V
-
-
Method Details
-
toArray
- Mappings:
Namespace Name Mixin selector named toArrayLnet/minecraft/nbt/NbtIntArray;toArray(Ljava/util/List;)[Iintermediary method_10590Lnet/minecraft/class_2495;method_10590(Ljava/util/List;)[Iofficial aLuf;a(Ljava/util/List;)[I
-
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 aLuy;a(Ljava/io/DataOutput;)V
-
getSizeInBytes
public int getSizeInBytes()- Mappings:
Namespace Name Mixin selector named getSizeInBytesLnet/minecraft/nbt/NbtElement;getSizeInBytes()Iintermediary method_47988Lnet/minecraft/class_2520;method_47988()Iofficial aLuy;a()I
-
getType
public 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 bLuy;b()B
-
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 cLuy;c()Lva;
-
toString
- Specified by:
toStringin interfaceNbtElement- Overrides:
toStringin classAbstractCollection<NbtInt>
-
copy
Description 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 copyLnet/minecraft/nbt/NbtIntArray;copy()Lnet/minecraft/nbt/NbtIntArray;intermediary method_10591Lnet/minecraft/class_2495;method_10591()Lnet/minecraft/class_2495;official eLuf;e()Luf;
-
equals
- Specified by:
equalsin interfaceCollection<NbtInt>- Specified by:
equalsin interfaceList<NbtInt>- Overrides:
equalsin classAbstractList<NbtInt>- Mappings:
Namespace Name Mixin selector named equalsLnet/minecraft/nbt/NbtIntArray;equals(Ljava/lang/Object;)Zintermediary equalsLnet/minecraft/class_2495;equals(Ljava/lang/Object;)Zofficial equalsLuf;equals(Ljava/lang/Object;)Z
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<NbtInt>- Specified by:
hashCodein interfaceList<NbtInt>- Overrides:
hashCodein classAbstractList<NbtInt>
-
getIntArray
public int[] getIntArray()Returns the underlying int array.- Returns:
- the underlying int array
- API Note:
- This does not copy the array, so modifications to the returned array also apply to this NBT int array.
- Mappings:
Namespace Name Mixin selector named getIntArrayLnet/minecraft/nbt/NbtIntArray;getIntArray()[Iintermediary method_10588Lnet/minecraft/class_2495;method_10588()[Iofficial gLuf;g()[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 aLuy;a(Lvc;)V
-
size
public int size()- Specified by:
sizein interfaceCollection<NbtInt>- Specified by:
sizein interfaceList<NbtInt>- Specified by:
sizein classAbstractCollection<NbtInt>
-
get
- Specified by:
getin interfaceList<NbtInt>- Specified by:
getin classAbstractList<NbtInt>- Mappings:
Namespace Name Mixin selector named getLnet/minecraft/nbt/NbtIntArray;get(I)Lnet/minecraft/nbt/NbtInt;intermediary method_10589Lnet/minecraft/class_2495;method_10589(I)Lnet/minecraft/class_2497;official aLuf;a(I)Lug;
-
set
- Specified by:
setin interfaceList<NbtInt>- Specified by:
setin classAbstractNbtList<NbtInt>- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/nbt/NbtIntArray;set(ILnet/minecraft/nbt/NbtInt;)Lnet/minecraft/nbt/NbtInt;intermediary method_17806Lnet/minecraft/class_2495;method_17806(ILnet/minecraft/class_2497;)Lnet/minecraft/class_2497;official aLuf;a(ILug;)Lug;
-
add
- Specified by:
addin interfaceList<NbtInt>- Specified by:
addin classAbstractNbtList<NbtInt>- Mappings:
Namespace Name Mixin selector named addLnet/minecraft/nbt/NbtIntArray;add(ILnet/minecraft/nbt/NbtInt;)Vintermediary method_17808Lnet/minecraft/class_2495;method_17808(ILnet/minecraft/class_2497;)Vofficial bLuf;b(ILug;)V
-
setElement
Sets the element atindextoelement. Does nothing if the types were incompatible.- Specified by:
setElementin classAbstractNbtList<NbtInt>- Returns:
- whether the element was actually set
- Mappings:
Namespace Name Mixin selector named setElementLnet/minecraft/nbt/AbstractNbtList;setElement(ILnet/minecraft/nbt/NbtElement;)Zintermediary method_10535Lnet/minecraft/class_2483;method_10535(ILnet/minecraft/class_2520;)Zofficial aLua;a(ILuy;)Z
-
addElement
Insertselementatindex. Does nothing if the types were incompatible.- Specified by:
addElementin classAbstractNbtList<NbtInt>- Returns:
- whether the element was actually added
- Mappings:
Namespace Name Mixin selector named addElementLnet/minecraft/nbt/AbstractNbtList;addElement(ILnet/minecraft/nbt/NbtElement;)Zintermediary method_10533Lnet/minecraft/class_2483;method_10533(ILnet/minecraft/class_2520;)Zofficial bLua;b(ILuy;)Z
-
remove
- Specified by:
removein interfaceList<NbtInt>- Specified by:
removein classAbstractNbtList<NbtInt>- Mappings:
Namespace Name Mixin selector named removeLnet/minecraft/nbt/NbtIntArray;remove(I)Lnet/minecraft/nbt/NbtInt;intermediary method_17807Lnet/minecraft/class_2495;method_17807(I)Lnet/minecraft/class_2497;official bLuf;b(I)Lug;
-
getHeldType
public byte getHeldType()Gets the type of element that this list holds.- Specified by:
getHeldTypein classAbstractNbtList<NbtInt>- Returns:
- the type of element that this list holds
- Mappings:
Namespace Name Mixin selector named getHeldTypeLnet/minecraft/nbt/AbstractNbtList;getHeldType()Bintermediary method_10601Lnet/minecraft/class_2483;method_10601()Bofficial fLua;f()B
-
clear
public void clear()- Specified by:
clearin interfaceCollection<NbtInt>- Specified by:
clearin interfaceList<NbtInt>- Overrides:
clearin classAbstractList<NbtInt>
-
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 aLuy;a(Luv;)Luv$b;
-