Package net.minecraft.nbt
Interface AbstractNbtList
- All Superinterfaces:
Iterable<NbtElement>
,NbtElement
- All Known Implementing Classes:
NbtByteArray
,NbtIntArray
,NbtList
,NbtLongArray
Represents an abstraction of a mutable NBT list which holds elements of the same type.
- Mappings:
Namespace Name named net/minecraft/nbt/AbstractNbtList
intermediary net/minecraft/class_2483
official tz
-
Field Summary
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, SHORT_TYPE, STRING_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addElement
(int index, NbtElement element) Insertselement
atindex
.void
clear()
get
(int int2) default boolean
isEmpty()
default Iterator
<NbtElement> iterator()
remove
(int int2) boolean
setElement
(int index, NbtElement element) Sets the element atindex
toelement
.int
size()
default Stream
<NbtElement> stream()
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface net.minecraft.nbt.NbtElement
accept, accept, asBoolean, asByte, asByteArray, asCompound, asDouble, asFloat, asInt, asIntArray, asLong, asLongArray, asNbtList, asNumber, asShort, asString, copy, doAccept, getNbtType, getSizeInBytes, getType, toString, write
-
Method Details
-
clear
void clear() -
setElement
Sets the element atindex
toelement
. Does nothing if the types were incompatible.- 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
Ltz;a(ILva;)Z
-
addElement
Insertselement
atindex
. Does nothing if the types were incompatible.- 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
Ltz;b(ILva;)Z
-
remove
-
get
-
size
int size() -
isEmpty
default boolean isEmpty() -
iterator
- Specified by:
iterator
in interfaceIterable<NbtElement>
-
stream
-