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 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 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, 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 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 aLtz;a(ILva;)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 bLtz;b(ILva;)Z
-
remove
-
get
-
size
int size() -
isEmpty
default boolean isEmpty() -
iterator
- Specified by:
iteratorin interfaceIterable<NbtElement>
-
stream
-