Class Pool<E extends Weighted>

java.lang.Object
net.minecraft.util.collection.Pool<E>
Direct Known Subclasses:
DataPool

public class Pool<E extends Weighted> extends Object
Mappings:
Namespace Name
official bcl
intermediary net/minecraft/class_6012
named net/minecraft/util/collection/Pool
  • Field Details

    • totalWeight

      private final int totalWeight
      Mappings:
      Namespace Name Mixin selector
      official a Lbcl;a:I
      intermediary field_29934 Lnet/minecraft/class_6012;field_29934:I
      named totalWeight Lnet/minecraft/util/collection/Pool;totalWeight:I
    • entries

      private final ImmutableList<E extends Weighted> entries
      Mappings:
      Namespace Name Mixin selector
      official b Lbcl;b:Lcom/google/common/collect/ImmutableList;
      intermediary field_29935 Lnet/minecraft/class_6012;field_29935:Lcom/google/common/collect/ImmutableList;
      named entries Lnet/minecraft/util/collection/Pool;entries:Lcom/google/common/collect/ImmutableList;
  • Constructor Details

    • Pool

      Pool(List<? extends E> entries)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbcl;<init>(Ljava/util/List;)V
      intermediary <init> Lnet/minecraft/class_6012;<init>(Ljava/util/List;)V
      named <init> Lnet/minecraft/util/collection/Pool;<init>(Ljava/util/List;)V
  • Method Details

    • empty

      public static <E extends Weighted> Pool<E> empty()
      Mappings:
      Namespace Name Mixin selector
      official c Lbcl;c()Lbcl;
      intermediary method_34990 Lnet/minecraft/class_6012;method_34990()Lnet/minecraft/class_6012;
      named empty Lnet/minecraft/util/collection/Pool;empty()Lnet/minecraft/util/collection/Pool;
    • of

      @SafeVarargs public static <E extends Weighted> Pool<E> of(E[] entries)
      Mappings:
      Namespace Name Mixin selector
      official a Lbcl;a([Lbcj;)Lbcl;
      intermediary method_34989 Lnet/minecraft/class_6012;method_34989([Lnet/minecraft/class_6008;)Lnet/minecraft/class_6012;
      named of Lnet/minecraft/util/collection/Pool;of([Lnet/minecraft/util/collection/Weighted;)Lnet/minecraft/util/collection/Pool;
    • of

      public static <E extends Weighted> Pool<E> of(List<E> entries)
      Mappings:
      Namespace Name Mixin selector
      official a Lbcl;a(Ljava/util/List;)Lbcl;
      intermediary method_34988 Lnet/minecraft/class_6012;method_34988(Ljava/util/List;)Lnet/minecraft/class_6012;
      named of Lnet/minecraft/util/collection/Pool;of(Ljava/util/List;)Lnet/minecraft/util/collection/Pool;
    • isEmpty

      public boolean isEmpty()
      Mappings:
      Namespace Name Mixin selector
      official d Lbcl;d()Z
      intermediary method_34993 Lnet/minecraft/class_6012;method_34993()Z
      named isEmpty Lnet/minecraft/util/collection/Pool;isEmpty()Z
    • getOrEmpty

      public Optional<E> getOrEmpty(Random random)
      Mappings:
      Namespace Name Mixin selector
      official b Lbcl;b(Lapf;)Ljava/util/Optional;
      intermediary method_34992 Lnet/minecraft/class_6012;method_34992(Lnet/minecraft/class_5819;)Ljava/util/Optional;
      named getOrEmpty Lnet/minecraft/util/collection/Pool;getOrEmpty(Lnet/minecraft/util/math/random/Random;)Ljava/util/Optional;
    • getEntries

      public List<E> getEntries()
      Mappings:
      Namespace Name Mixin selector
      official e Lbcl;e()Ljava/util/List;
      intermediary method_34994 Lnet/minecraft/class_6012;method_34994()Ljava/util/List;
      named getEntries Lnet/minecraft/util/collection/Pool;getEntries()Ljava/util/List;
    • createCodec

      public static <E extends Weighted> com.mojang.serialization.Codec<Pool<E>> createCodec(com.mojang.serialization.Codec<E> entryCodec)
      Mappings:
      Namespace Name Mixin selector
      official c Lbcl;c(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      intermediary method_34991 Lnet/minecraft/class_6012;method_34991(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      named createCodec Lnet/minecraft/util/collection/Pool;createCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;