Class RegistryEntryList.ListBacked<T>

java.lang.Object
net.minecraft.registry.entry.RegistryEntryList.ListBacked<T>
All Implemented Interfaces:
Iterable<RegistryEntry<T>>, RegistryEntryList<T>
Direct Known Subclasses:
RegistryEntryList.Direct, RegistryEntryList.Named
Enclosing interface:
RegistryEntryList<T>

public abstract static class RegistryEntryList.ListBacked<T> extends Object implements RegistryEntryList<T>
An internal implementation of RegistryEntryList.
Mappings:
Namespace Name
named net/minecraft/registry/entry/RegistryEntryList$ListBacked
intermediary net/minecraft/class_6885$class_6887
official jq$b
  • Constructor Details

    • ListBacked

      public ListBacked()
  • Method Details

    • getEntries

      protected abstract List<RegistryEntry<T>> getEntries()
      Mappings:
      Namespace Name Mixin selector
      named getEntries Lnet/minecraft/registry/entry/RegistryEntryList$ListBacked;getEntries()Ljava/util/List;
      intermediary method_40249 Lnet/minecraft/class_6885$class_6887;method_40249()Ljava/util/List;
      official f Ljq$b;f()Ljava/util/List;
    • size

      public int size()
      Returns the number of entries in this list.
      Specified by:
      size in interface RegistryEntryList<T>
      Returns:
      the number of entries in this list
      Mappings:
      Namespace Name Mixin selector
      named size Lnet/minecraft/registry/entry/RegistryEntryList;size()I
      intermediary method_40247 Lnet/minecraft/class_6885;method_40247()I
      official b Ljq;b()I
    • spliterator

      public Spliterator<RegistryEntry<T>> spliterator()
      Specified by:
      spliterator in interface Iterable<T>
    • iterator

      public Iterator<RegistryEntry<T>> iterator()
      Specified by:
      iterator in interface Iterable<T>
    • stream

      public Stream<RegistryEntry<T>> stream()
      Returns a stream of registry entries in this list.
      Specified by:
      stream in interface RegistryEntryList<T>
      Returns:
      a stream of registry entries in this list
      Mappings:
      Namespace Name Mixin selector
      named stream Lnet/minecraft/registry/entry/RegistryEntryList;stream()Ljava/util/stream/Stream;
      intermediary method_40239 Lnet/minecraft/class_6885;method_40239()Ljava/util/stream/Stream;
      official a Ljq;a()Ljava/util/stream/Stream;
    • getRandom

      public Optional<RegistryEntry<T>> getRandom(Random random)
      Returns a random entry of the list, or an empty optional if this list is empty.
      Specified by:
      getRandom in interface RegistryEntryList<T>
      Returns:
      a random entry of the list, or an empty optional if this list is empty
      Mappings:
      Namespace Name Mixin selector
      named getRandom Lnet/minecraft/registry/entry/RegistryEntryList;getRandom(Lnet/minecraft/util/math/random/Random;)Ljava/util/Optional;
      intermediary method_40243 Lnet/minecraft/class_6885;method_40243(Lnet/minecraft/class_5819;)Ljava/util/Optional;
      official a Ljq;a(Layv;)Ljava/util/Optional;
    • get

      public RegistryEntry<T> get(int index)
      Returns the registry entry at index.
      Specified by:
      get in interface RegistryEntryList<T>
      Returns:
      the registry entry at index
      Throws:
      IndexOutOfBoundsException - if the index is out of bounds
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/registry/entry/RegistryEntryList;get(I)Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_40240 Lnet/minecraft/class_6885;method_40240(I)Lnet/minecraft/class_6880;
      official a Ljq;a(I)Ljm;
    • ownerEquals

      public boolean ownerEquals(RegistryEntryOwner<T> owner)
      Specified by:
      ownerEquals in interface RegistryEntryList<T>
      Mappings:
      Namespace Name Mixin selector
      named ownerEquals Lnet/minecraft/registry/entry/RegistryEntryList;ownerEquals(Lnet/minecraft/registry/entry/RegistryEntryOwner;)Z
      intermediary method_46768 Lnet/minecraft/class_6885;method_46768(Lnet/minecraft/class_7876;)Z
      official a Ljq;a(Ljp;)Z