Class RewardPool<T>

java.lang.Object
com.pixelmonmod.pixelmon.api.util.RewardPool<T>

public class RewardPool<T> extends Object
  • Constructor Details

    • RewardPool

      protected RewardPool(RewardPool.Builder<T> builder)
    • RewardPool

      protected RewardPool(Optional<T> guaranteedReward, int rewardRollsMin, int rewardRollsMax, double chanceOfAdditionalRewards, RandomWeightedSet<T> rewards)
  • Method Details

    • codec

      public static <A> com.mojang.serialization.Codec<RewardPool<A>> codec(com.mojang.serialization.Codec<A> codec)
    • roll

      public List<T> roll(Predicate<T> filter)
    • builder

      public static <A> RewardPool.Builder<A> builder(A guaranteedReward)