Class Weighting

java.lang.Object
net.minecraft.util.collection.Weighting

public class Weighting extends Object
Mappings:
Namespace Name
named net/minecraft/util/collection/Weighting
intermediary net/minecraft/class_6011
official bou
  • Constructor Details

    • Weighting

      private Weighting()
  • Method Details

    • getWeightSum

      public static int getWeightSum(List<? extends Weighted> pool)
      Mappings:
      Namespace Name Mixin selector
      named getWeightSum Lnet/minecraft/util/collection/Weighting;getWeightSum(Ljava/util/List;)I
      intermediary method_34984 Lnet/minecraft/class_6011;method_34984(Ljava/util/List;)I
      official a Lbou;a(Ljava/util/List;)I
    • getRandom

      public static <T extends Weighted> Optional<T> getRandom(Random random, List<T> pool, int totalWeight)
      Mappings:
      Namespace Name Mixin selector
      named getRandom Lnet/minecraft/util/collection/Weighting;getRandom(Lnet/minecraft/util/math/random/Random;Ljava/util/List;I)Ljava/util/Optional;
      intermediary method_34987 Lnet/minecraft/class_6011;method_34987(Lnet/minecraft/class_5819;Ljava/util/List;I)Ljava/util/Optional;
      official a Lbou;a(Layo;Ljava/util/List;I)Ljava/util/Optional;
    • getAt

      public static <T extends Weighted> Optional<T> getAt(List<T> pool, int totalWeight)
      Mappings:
      Namespace Name Mixin selector
      named getAt Lnet/minecraft/util/collection/Weighting;getAt(Ljava/util/List;I)Ljava/util/Optional;
      intermediary method_34985 Lnet/minecraft/class_6011;method_34985(Ljava/util/List;I)Ljava/util/Optional;
      official a Lbou;a(Ljava/util/List;I)Ljava/util/Optional;
    • getRandom

      public static <T extends Weighted> Optional<T> getRandom(Random random, List<T> pool)
      Mappings:
      Namespace Name Mixin selector
      named getRandom Lnet/minecraft/util/collection/Weighting;getRandom(Lnet/minecraft/util/math/random/Random;Ljava/util/List;)Ljava/util/Optional;
      intermediary method_34986 Lnet/minecraft/class_6011;method_34986(Lnet/minecraft/class_5819;Ljava/util/List;)Ljava/util/Optional;
      official a Lbou;a(Layo;Ljava/util/List;)Ljava/util/Optional;