Core modifier

Create a core modifier using KubeJS

A core modifier can be used to modify the amount of cores a machine can use for processing recipe.

Each core can process a single recipe at a time, but not necessarily the same recipe as the other cores.

//Create a modifier that add/multiply the machine processor core amount
//Value can be any numerical value.
//Pick one of the 3 methods below :
CMCoreModifierBuilder.add(value)
CMCoreModifierBuilder.mul(value)
CMCoreModifierBuilder.exp(value)

//All methods below are optional

//Specify the maximum value that can be obtained after applying this modifier.
//It can be any numerical value.
//Default is POSITIVE_INFINITY.
.max(double max)

//Specify the minimum value that can be obtained after applying this modifier.
//It can be any numerical value.
//Default is NEGATIVE_INFINITY.
.min(double max)

//Change the tooltip displayed when holding shift while hovering the upgrade item.
//Default : a short string that describe the effect of this modifier.
.tooltip(String tooltip)
//Use Text.of("text here") for more formating options.
//See https://kubejs.com/wiki/kubejs/Text/
.tooltip(Text tooltip)

Example

A modifier that double the machine core amount

CMCoreModifierBuilder.mul(2)

A modifier that add 1 core to the machine

CMCoreModifierBuilder.add(1)

Last updated