Interface AbstractNbtList

All Superinterfaces:
Iterable<NbtElement>, NbtElement
All Known Implementing Classes:
NbtByteArray, NbtIntArray, NbtList, NbtLongArray

public non-sealed interface AbstractNbtList extends Iterable<NbtElement>, NbtElement
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
  • Method Details Link icon

    • clear Link icon

      void clear()
    • setElement Link icon

      boolean setElement(int index, NbtElement element)
      Sets the element at index to element. 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 Link icon

      boolean addElement(int index, NbtElement element)
      Inserts element at index. 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 Link icon

      NbtElement remove(int int2)
    • get Link icon

      NbtElement get(int int2)
    • size Link icon

      int size()
    • isEmpty Link icon

      default boolean isEmpty()
    • iterator Link icon

      default Iterator<NbtElement> iterator()
      Specified by:
      iterator in interface Iterable<NbtElement>
    • stream Link icon

      default Stream<NbtElement> stream()