RandomSource
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.util.math.RandomSource;
Members
nextBoolean() as bool
// RandomSource.nextBoolean() as bool;myRandomSource.nextBoolean();
Return Type:
bool
nextDouble() as double
// RandomSource.nextDouble() as double;myRandomSource.nextDouble();
Return Type:
double
nextFloat() as float
// RandomSource.nextFloat() as float;myRandomSource.nextFloat();
Return Type:
float
nextGaussian() as double
// RandomSource.nextGaussian() as double;myRandomSource.nextGaussian();
Return Type:
double
nextInt() as int
// RandomSource.nextInt() as int;myRandomSource.nextInt();
Return Type:
int
nextInt(bound as int) as int
// RandomSource.nextInt(bound as int) as int;myRandomSource.nextInt(myInt);
Parameters:
bound: int
Type: int
Return Type:
int
nextInt(bound as int, origin as int) as int
// RandomSource.nextInt(bound as int, origin as int) as int;myRandomSource.nextInt(myInt, myInt);
Parameters:
bound: int
Type: int
origin: int
Type: int
Return Type:
int
nextIntBetweenInclusive(origin as int, bound as int) as int
// RandomSource.nextIntBetweenInclusive(origin as int, bound as int) as int;myRandomSource.nextIntBetweenInclusive(myInt, myInt);
Parameters:
origin: int
Type: int
bound: int
Type: int
Return Type:
int
nextLong() as long
// RandomSource.nextLong() as long;myRandomSource.nextLong();
Return Type:
long