Class AbstractNbtList<T extends NbtElement>

java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
net.minecraft.nbt.AbstractNbtList<T>
All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>, SequencedCollection<T>, NbtElement
Direct Known Subclasses:
NbtByteArray, NbtIntArray, NbtList, NbtLongArray

public abstract class AbstractNbtList<T extends NbtElement> extends AbstractList<T> implements 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 uw
  • Constructor Details

    • AbstractNbtList

      public AbstractNbtList()
  • Method Details

    • set

      public abstract T set(int int2, T t)
      Specified by:
      set in interface List<T extends NbtElement>
      Overrides:
      set in class AbstractList<T extends NbtElement>
      Mappings:
      Namespace Name Mixin selector
      named set Lnet/minecraft/nbt/AbstractNbtList;set(ILnet/minecraft/nbt/NbtElement;)Lnet/minecraft/nbt/NbtElement;
      intermediary method_10606 Lnet/minecraft/class_2483;method_10606(ILnet/minecraft/class_2520;)Lnet/minecraft/class_2520;
      official d Luw;d(ILvu;)Lvu;
    • add

      public abstract void add(int int2, T t)
      Specified by:
      add in interface List<T extends NbtElement>
      Overrides:
      add in class AbstractList<T extends NbtElement>
      Mappings:
      Namespace Name Mixin selector
      named add Lnet/minecraft/nbt/AbstractNbtList;add(ILnet/minecraft/nbt/NbtElement;)V
      intermediary method_10531 Lnet/minecraft/class_2483;method_10531(ILnet/minecraft/class_2520;)V
      official c Luw;c(ILvu;)V
    • remove

      public abstract T remove(int int2)
      Specified by:
      remove in interface List<T extends NbtElement>
      Overrides:
      remove in class AbstractList<T extends NbtElement>
      Mappings:
      Namespace Name Mixin selector
      named remove Lnet/minecraft/nbt/AbstractNbtList;remove(I)Lnet/minecraft/nbt/NbtElement;
      intermediary method_10536 Lnet/minecraft/class_2483;method_10536(I)Lnet/minecraft/class_2520;
      official c Luw;c(I)Lvu;
    • setElement

      public abstract 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 Luw;a(ILvu;)Z
    • addElement

      public abstract 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 Luw;b(ILvu;)Z
    • getHeldType

      public abstract byte getHeldType()
      Gets the type of element that this list holds.
      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