RandomSource
Link to randomsource
Импорт класса
Link to импорт-класса
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 Copyimport crafttweaker.api.util.math.RandomSource;
Методы
Link to методы
Name: nextBoolean
Return Type: boolean
ZenScript Copy// RandomSource.nextBoolean() as boolean
myRandomSource.nextBoolean();
Name: nextDouble
Return Type: double
ZenScript Copy// RandomSource.nextDouble() as double
myRandomSource.nextDouble();
Name: nextFloat
Return Type: float
ZenScript Copy// RandomSource.nextFloat() as float
myRandomSource.nextFloat();
Name: nextGaussian
Return Type: double
ZenScript Copy// RandomSource.nextGaussian() as double
myRandomSource.nextGaussian();
Name: nextInt
Return Type: int
ZenScript Copy// RandomSource.nextInt() as int
myRandomSource.nextInt();
Name: nextInt
Return Type: int
ZenScript CopyRandomSource.nextInt(bound as int) as int
Параметр | Тип |
---|---|
Параметр bound | Тип int |
Name: nextInt
Return Type: int
ZenScript CopyRandomSource.nextInt(bound as int, origin as int) as int
Параметр | Тип |
---|---|
Параметр bound | Тип int |
Параметр origin | Тип int |
Name: nextIntBetweenInclusive
Return Type: int
ZenScript CopyRandomSource.nextIntBetweenInclusive(origin as int, bound as int) as int
Параметр | Тип |
---|---|
Параметр origin | Тип int |
Параметр bound | Тип int |
Name: nextLong
Return Type: long
ZenScript Copy// RandomSource.nextLong() as long
myRandomSource.nextLong();