Class RandomUtil.EasyRandom

java.lang.Object
com.idark.valoria.util.RandomUtil.EasyRandom
Enclosing class:
RandomUtil

public static final class RandomUtil.EasyRandom extends Object
  • Constructor Details

    • EasyRandom

      public EasyRandom(@Nonnull Random rand)
  • Method Details

    • source

      public Random source()
    • fiftyFifty

      public boolean fiftyFifty()
    • percentChance

      public boolean percentChance(float percentChance)
    • randomNumberUpTo

      public int randomNumberUpTo(int upperBound)
    • randomValueUpTo

      public float randomValueUpTo(float upperBound)
    • randomValueUpTo

      public double randomValueUpTo(double upperBound)
    • randomGaussianValue

      public double randomGaussianValue()
    • randomScaledGaussianValue

      public double randomScaledGaussianValue(double scale)
    • randomNumberBetween

      public int randomNumberBetween(int min, int max)
    • randomValueBetween

      public double randomValueBetween(double min, double max)
    • getRandomSelection

      public <T> T getRandomSelection(@Nonnull T... options)
    • getRandomSelection

      public <T> T getRandomSelection(@Nonnull List<T> options)
    • getRandomPositionWithinRange

      public net.minecraft.core.BlockPos getRandomPositionWithinRange(net.minecraft.core.BlockPos centerPos, int xRadius, int yRadius, int zRadius)
    • getRandomPositionWithinRange

      public net.minecraft.core.BlockPos getRandomPositionWithinRange(net.minecraft.core.BlockPos centerPos, int xRadius, int yRadius, int zRadius, boolean safeSurfacePlacement, net.minecraft.world.level.Level world)
    • getRandomPositionWithinRange

      public net.minecraft.core.BlockPos getRandomPositionWithinRange(net.minecraft.core.BlockPos centerPos, int xRadius, int yRadius, int zRadius, boolean safeSurfacePlacement, net.minecraft.world.level.Level world, @Nullable Predicate<net.minecraft.world.level.block.state.BlockState> statePredicate, int tries)