ConstantInt

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.util.valueprovider.ConstantInt;

Extends

ConstantInt extends IntProvider.

Members

Getter
script.zs
// ConstantInt.maxValue as int
myConstantInt.maxValue

Return Type: int

Getter
script.zs
// ConstantInt.minValue as int
myConstantInt.minValue

Return Type: int

static of(value as int) as ConstantInt
script.zs
// ConstantInt.of(value as int) as ConstantInt;
ConstantInt.of(myInt);

Parameters:

value Type: int

Return Type: ConstantInt

sample(var1 as RandomSource) as int
script.zs
// ConstantInt.sample(var1 as RandomSource) as int;
myConstantInt.sample(myRandomSource);

Parameters:

Return Type: int

Getter
script.zs
// ConstantInt.value as int
myConstantInt.value

Return Type: int