Class WeightedPicker

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

public class WeightedPicker extends Object
Mappings:
Namespace Name
official aho
intermediary net/minecraft/class_3549
named net/minecraft/util/collection/WeightedPicker
  • Field Details

    • LOGGER

      static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Laho;a:Lorg/apache/logging/log4j/Logger;
      intermediary field_28398 Lnet/minecraft/class_3549;field_28398:Lorg/apache/logging/log4j/Logger;
      named LOGGER Lnet/minecraft/util/collection/WeightedPicker;LOGGER:Lorg/apache/logging/log4j/Logger;
  • Constructor Details

    • WeightedPicker

      public WeightedPicker()
  • Method Details

    • getWeightSum

      public static int getWeightSum(List<? extends WeightedPicker.Entry> list)
      Mappings:
      Namespace Name Mixin selector
      official a Laho;a(Ljava/util/List;)I
      intermediary method_15445 Lnet/minecraft/class_3549;method_15445(Ljava/util/List;)I
      named getWeightSum Lnet/minecraft/util/collection/WeightedPicker;getWeightSum(Ljava/util/List;)I
    • getRandom

      public static <T extends WeightedPicker.Entry> Optional<T> getRandom(Random random, List<T> list, int weightSum)
      Mappings:
      Namespace Name Mixin selector
      official a Laho;a(Ljava/util/Random;Ljava/util/List;I)Ljava/util/Optional;
      intermediary method_15444 Lnet/minecraft/class_3549;method_15444(Ljava/util/Random;Ljava/util/List;I)Ljava/util/Optional;
      named getRandom Lnet/minecraft/util/collection/WeightedPicker;getRandom(Ljava/util/Random;Ljava/util/List;I)Ljava/util/Optional;
    • getAt

      public static <T extends WeightedPicker.Entry> Optional<T> getAt(List<T> list, int weightMark)
      Mappings:
      Namespace Name Mixin selector
      official a Laho;a(Ljava/util/List;I)Ljava/util/Optional;
      intermediary method_15447 Lnet/minecraft/class_3549;method_15447(Ljava/util/List;I)Ljava/util/Optional;
      named getAt Lnet/minecraft/util/collection/WeightedPicker;getAt(Ljava/util/List;I)Ljava/util/Optional;
    • getRandom

      public static <T extends WeightedPicker.Entry> Optional<T> getRandom(Random random, List<T> list)
      Mappings:
      Namespace Name Mixin selector
      official a Laho;a(Ljava/util/Random;Ljava/util/List;)Ljava/util/Optional;
      intermediary method_15446 Lnet/minecraft/class_3549;method_15446(Ljava/util/Random;Ljava/util/List;)Ljava/util/Optional;
      named getRandom Lnet/minecraft/util/collection/WeightedPicker;getRandom(Ljava/util/Random;Ljava/util/List;)Ljava/util/Optional;