ClampedInt

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.ClampedInt;

Extends

ClampedInt extends IntProvider.

Members

Getter
script.zs
// ClampedInt.maxValue as int
myClampedInt.maxValue

Return Type: int

Getter
script.zs
// ClampedInt.minValue as int
myClampedInt.minValue

Return Type: int

static of(delegate as IntProvider, minInclusive as int, maxInclusive as int) as ClampedInt
script.zs
// ClampedInt.of(delegate as IntProvider, minInclusive as int, maxInclusive as int) as ClampedInt;
ClampedInt.of(myIntProvider, myInt, myInt);

Parameters:

delegate Type: IntProvider
minInclusive Type: int
maxInclusive Type: int

Return Type: ClampedInt

sample(var1 as RandomSource) as int
script.zs
// ClampedInt.sample(var1 as RandomSource) as int;
myClampedInt.sample(myRandomSource);

Parameters:

Return Type: int