public class RandomValueRange extends java.lang.Object implements IRandomRange
Modifier and Type | Class and Description |
---|---|
static class |
RandomValueRange.Serializer |
Modifier and Type | Field and Description |
---|---|
private float |
max |
private float |
min |
BINOMIAL, CONSTANT, UNIFORM
Constructor and Description |
---|
RandomValueRange(float value) |
RandomValueRange(float minIn,
float maxIn) |
Modifier and Type | Method and Description |
---|---|
float |
generateFloat(java.util.Random rand) |
int |
generateInt(java.util.Random rand) |
float |
getMax() |
float |
getMin() |
ResourceLocation |
getType() |
boolean |
isInRange(int value) |
static RandomValueRange |
of(float minIn,
float maxIn) |
public RandomValueRange(float minIn, float maxIn)
public RandomValueRange(float value)
public static RandomValueRange of(float minIn, float maxIn)
public float getMin()
public float getMax()
public int generateInt(java.util.Random rand)
generateInt
in interface IRandomRange
public float generateFloat(java.util.Random rand)
public boolean isInRange(int value)
public ResourceLocation getType()
getType
in interface IRandomRange