Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

NumberProvider

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.

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

Implements

Undocumented Interfaces

LootContextUser

Members

static between(min as float, max as float) as NumberProvider
script.zs
// NumberProvider.between(min as float, max as float) as NumberProvider;
NumberProvider.between(myFloat, myFloat);

Parameters:

min Type: float
max Type: float

Return Type: NumberProvider

static binomial(n as int, p as int) as NumberProvider
script.zs
// NumberProvider.binomial(n as int, p as int) as NumberProvider;
NumberProvider.binomial(myInt, myInt);

Parameters:

n Type: int
p Type: int

Return Type: NumberProvider

static exactly(value as float) as NumberProvider
script.zs
// NumberProvider.exactly(value as float) as NumberProvider;
NumberProvider.exactly(myFloat);

Parameters:

value Type: float

Return Type: NumberProvider

static scoreboard(target as EntityTarget, score as string, scale as float = 1.0) as NumberProvider
script.zs
// NumberProvider.scoreboard(target as EntityTarget, score as string, scale as float = 1.0) as NumberProvider;
NumberProvider.scoreboard(myEntityTarget, myString, myFloat);

Parameters:

target Type: EntityTarget
score Type: string
scale (optional) Type: float

Default Value: 1.0

Return Type: NumberProvider