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/AbstractNbtListintermediary net/minecraft/class_2483official ty
-
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 TypeMethodDescriptionbooleanaddElement(int index, NbtElement element) Insertselementatindex.voidclear()get(int int2) default booleanisEmpty()default Iterator<NbtElement> iterator()remove(int int2) booleansetElement(int index, NbtElement element) Sets the element atindextoelement.intsize()default Stream<NbtElement> stream()Methods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.nbt.NbtElement
accept, accept, copy, doAccept, getNbtType, getSizeInBytes, getType, method_68559, method_68571, method_68572, method_68592, method_68593, method_68599, method_68600, method_68601, method_68602, method_68603, method_68604, method_68605, method_68606, method_68658, toString, write
-
Method Details
-
clear
void clear() -
setElement
Sets the element atindextoelement. Does nothing if the types were incompatible.- 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 aLty;a(ILuy;)Z
-
addElement
Insertselementatindex. Does nothing if the types were incompatible.- 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 bLty;b(ILuy;)Z
-
remove
-
get
-
size
int size() -
isEmpty
default boolean isEmpty() -
iterator
- Specified by:
iteratorin interfaceIterable<NbtElement>
-
stream
-