Class Weighting

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

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

    • Weighting

      private Weighting()
  • Method Details

    • getWeightSum

      public static int getWeightSum(List<? extends Weighted> pool)
      Mappings:
      Namespace Name Mixin selector
      official a Lbck;a(Ljava/util/List;)I
      intermediary method_34984 Lnet/minecraft/class_6011;method_34984(Ljava/util/List;)I
      named getWeightSum Lnet/minecraft/util/collection/Weighting;getWeightSum(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
      official a Lbck;a(Lapf;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;
      named getRandom Lnet/minecraft/util/collection/Weighting;getRandom(Lnet/minecraft/util/math/random/Random;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
      official a Lbck;a(Ljava/util/List;I)Ljava/util/Optional;
      intermediary method_34985 Lnet/minecraft/class_6011;method_34985(Ljava/util/List;I)Ljava/util/Optional;
      named getAt Lnet/minecraft/util/collection/Weighting;getAt(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
      official a Lbck;a(Lapf;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;
      named getRandom Lnet/minecraft/util/collection/Weighting;getRandom(Lnet/minecraft/util/math/random/Random;Ljava/util/List;)Ljava/util/Optional;