public class UniformIntDistribution extends Object
Modifier and Type | Field and Description |
---|---|
private int |
base |
static com.mojang.serialization.Codec<UniformIntDistribution> |
CODEC |
private int |
spread |
Modifier | Constructor and Description |
---|---|
private |
UniformIntDistribution(int base,
int spread) |
Modifier and Type | Method and Description |
---|---|
static com.mojang.serialization.Codec<UniformIntDistribution> |
createValidatedCodec(int minBase,
int maxBase,
int maxSpread) |
boolean |
equals(Object object) |
int |
getValue(Random random) |
int |
hashCode() |
static UniformIntDistribution |
of(int value)
Creates a distribution with a constant value.
|
static UniformIntDistribution |
of(int base,
int spread) |
String |
toString() |
public static final com.mojang.serialization.Codec<UniformIntDistribution> CODEC
private final int base
private final int spread
public static com.mojang.serialization.Codec<UniformIntDistribution> createValidatedCodec(int minBase, int maxBase, int maxSpread)
public static UniformIntDistribution of(int value)
value
- the constant valuepublic static UniformIntDistribution of(int base, int spread)
public int getValue(Random random)