Home Commands Examples Getting Started With Scripts Global Keywords

NumberProvider

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.

script.zs
import crafttweaker.api.loot.NumberProvider;

Static Methods

Return Type: NumberProvider

script.zs
NumberProvider.between(min as float, max as float) as NumberProvider
ParameterType
Parameter
min
Type
float
Parameter
max
Type
float

Return Type: NumberProvider

script.zs
NumberProvider.binomial(n as int, p as int) as NumberProvider
ParameterType
Parameter
n
Type
int
Parameter
p
Type
int

Return Type: NumberProvider

script.zs
NumberProvider.exactly(value as float) as NumberProvider
ParameterType
Parameter
value
Type
float

Return Type: NumberProvider

script.zs
NumberProvider.scoreboard(target as EntityTarget, score as string, scale as float) as NumberProvider
ParameterTypeOptionalDefault Value
Parameter
target
Type
EntityTarget
Optional
false
Default Value
Parameter
score
Type
string
Optional
false
Default Value
Parameter
scale
Type
float
Optional
true
Default Value
1.0