Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.util.math.Random;

Link to g-

Name: nextBoolean

Return Type: boolean

ZenScript
Copy
// Random.nextBoolean() as boolean

myRandom.nextBoolean();

Link to g--1

Name: nextDouble

Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.

Return Type: double

ZenScript
Copy
// Random.nextDouble() as double

myRandom.nextDouble();

Link to g--2

Name: nextFloat

Returns the next pseudorandom, uniformly distributed float value between 0.0f and 1.0f from this random number generator's sequence.

Return Type: float

ZenScript
Copy
// Random.nextFloat() as float

myRandom.nextFloat();

Name: nextInt

Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.

Return Type: int

ZenScript
Copy
// Random.nextInt() as int

myRandom.nextInt();

Name: nextInt

Returns the next pseudorandom, uniformly distributed int value between zero (inclusive) and bound (exclusive) from this random number generator's sequence

Return Type: int

ZenScript
Copy
Random.nextInt(bound as int) as int
ParameterTypeDescription
Parameter
bound
Type
int
Description
the upper bound (exclusive). Must be positive.