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/NbtIntArray
intermediary net/minecraft/class_2495
official vb
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
static final NbtType
<NbtIntArray> private int[]
Fields inherited from class java.util.AbstractList
modCount
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(NbtElementVisitor visitor) void
boolean
addElement
(int index, NbtElement element) Insertselement
atindex
.void
clear()
copy()
Returns an NBT element of equal value that won't change with this element.doAccept
(NbtScanner visitor) boolean
get
(int int2) byte
Gets the type of element that this list holds.int[]
Returns the underlying int array.Returns the NBT type definition of this NBT element.int
byte
getType()
Returns the type of this NBT element.int
hashCode()
remove
(int int2) boolean
setElement
(int index, NbtElement element) Sets the element atindex
toelement
.int
size()
private static int[]
toString()
void
write
(DataOutput output) Writes the NBT element tooutput
.Methods inherited from class java.util.AbstractList
add, addAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
Methods 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 SIZE
Lnet/minecraft/nbt/NbtIntArray;SIZE:I
intermediary field_41723
Lnet/minecraft/class_2495;field_41723:I
official b
Lvb;b:I
-
TYPE
- Mappings:
Namespace Name Mixin selector named TYPE
Lnet/minecraft/nbt/NbtIntArray;TYPE:Lnet/minecraft/nbt/NbtType;
intermediary field_21036
Lnet/minecraft/class_2495;field_21036:Lnet/minecraft/class_4614;
official a
Lvb;a:Lvw;
-
value
private int[] value- Mappings:
Namespace Name Mixin selector named value
Lnet/minecraft/nbt/NbtIntArray;value:[I
intermediary field_11524
Lnet/minecraft/class_2495;field_11524:[I
official c
Lvb;c:[I
-
-
Constructor Details
-
NbtIntArray
public NbtIntArray(int[] value) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/nbt/NbtIntArray;<init>([I)V
intermediary <init>
Lnet/minecraft/class_2495;<init>([I)V
official <init>
Lvb;<init>([I)V
-
NbtIntArray
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/nbt/NbtIntArray;<init>(Ljava/util/List;)V
intermediary <init>
Lnet/minecraft/class_2495;<init>(Ljava/util/List;)V
official <init>
Lvb;<init>(Ljava/util/List;)V
-
-
Method Details
-
toArray
- Mappings:
Namespace Name Mixin selector named toArray
Lnet/minecraft/nbt/NbtIntArray;toArray(Ljava/util/List;)[I
intermediary method_10590
Lnet/minecraft/class_2495;method_10590(Ljava/util/List;)[I
official a
Lvb;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 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
Lvu;a(Ljava/io/DataOutput;)V
-
getSizeInBytes
public 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
Lvu;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 getType
Lnet/minecraft/nbt/NbtElement;getType()B
intermediary method_10711
Lnet/minecraft/class_2520;method_10711()B
official b
Lvu;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 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
Lvu;c()Lvw;
-
toString
- Specified by:
toString
in interfaceNbtElement
- Overrides:
toString
in classAbstractCollection<NbtInt>
-
copy
Description copied from interface:NbtElement
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 copy
Lnet/minecraft/nbt/NbtIntArray;copy()Lnet/minecraft/nbt/NbtIntArray;
intermediary method_10591
Lnet/minecraft/class_2495;method_10591()Lnet/minecraft/class_2495;
official e
Lvb;e()Lvb;
-
equals
- Specified by:
equals
in interfaceCollection<NbtInt>
- Specified by:
equals
in interfaceList<NbtInt>
- Overrides:
equals
in classAbstractList<NbtInt>
- Mappings:
Namespace Name Mixin selector named equals
Lnet/minecraft/nbt/NbtIntArray;equals(Ljava/lang/Object;)Z
intermediary equals
Lnet/minecraft/class_2495;equals(Ljava/lang/Object;)Z
official equals
Lvb;equals(Ljava/lang/Object;)Z
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<NbtInt>
- Specified by:
hashCode
in interfaceList<NbtInt>
- Overrides:
hashCode
in 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 getIntArray
Lnet/minecraft/nbt/NbtIntArray;getIntArray()[I
intermediary method_10588
Lnet/minecraft/class_2495;method_10588()[I
official g
Lvb;g()[I
-
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
Lvu;a(Lvy;)V
-
size
public int size()- Specified by:
size
in interfaceCollection<NbtInt>
- Specified by:
size
in interfaceList<NbtInt>
- Specified by:
size
in classAbstractCollection<NbtInt>
-
get
- Specified by:
get
in interfaceList<NbtInt>
- Specified by:
get
in classAbstractList<NbtInt>
- Mappings:
Namespace Name Mixin selector named get
Lnet/minecraft/nbt/NbtIntArray;get(I)Lnet/minecraft/nbt/NbtInt;
intermediary method_10589
Lnet/minecraft/class_2495;method_10589(I)Lnet/minecraft/class_2497;
official a
Lvb;a(I)Lvc;
-
set
- Specified by:
set
in interfaceList<NbtInt>
- Specified by:
set
in classAbstractNbtList<NbtInt>
- Mappings:
Namespace Name Mixin selector named set
Lnet/minecraft/nbt/NbtIntArray;set(ILnet/minecraft/nbt/NbtInt;)Lnet/minecraft/nbt/NbtInt;
intermediary method_17806
Lnet/minecraft/class_2495;method_17806(ILnet/minecraft/class_2497;)Lnet/minecraft/class_2497;
official a
Lvb;a(ILvc;)Lvc;
-
add
- Specified by:
add
in interfaceList<NbtInt>
- Specified by:
add
in classAbstractNbtList<NbtInt>
- Mappings:
Namespace Name Mixin selector named add
Lnet/minecraft/nbt/NbtIntArray;add(ILnet/minecraft/nbt/NbtInt;)V
intermediary method_17808
Lnet/minecraft/class_2495;method_17808(ILnet/minecraft/class_2497;)V
official b
Lvb;b(ILvc;)V
-
setElement
Sets the element atindex
toelement
. Does nothing if the types were incompatible.- Specified by:
setElement
in classAbstractNbtList<NbtInt>
- 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
Luw;a(ILvu;)Z
-
addElement
Insertselement
atindex
. Does nothing if the types were incompatible.- Specified by:
addElement
in classAbstractNbtList<NbtInt>
- 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
Luw;b(ILvu;)Z
-
remove
- Specified by:
remove
in interfaceList<NbtInt>
- Specified by:
remove
in classAbstractNbtList<NbtInt>
- Mappings:
Namespace Name Mixin selector named remove
Lnet/minecraft/nbt/NbtIntArray;remove(I)Lnet/minecraft/nbt/NbtInt;
intermediary method_17807
Lnet/minecraft/class_2495;method_17807(I)Lnet/minecraft/class_2497;
official b
Lvb;b(I)Lvc;
-
getHeldType
public byte getHeldType()Gets the type of element that this list holds.- Specified by:
getHeldType
in classAbstractNbtList<NbtInt>
- 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
Luw;f()B
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<NbtInt>
- Specified by:
clear
in interfaceList<NbtInt>
- Overrides:
clear
in classAbstractList<NbtInt>
-
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
Lvu;a(Lvr;)Lvr$b;
-