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

Composter

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.misc.Composter;

Description

Members

setValue(stack as IItemStack, amount as float)
Sets the compost value of the given IItemStack.
The amount should be between 0 and 1, anything above 1 would just be wasted.
script.zs
// CTComposter.setValue(stack as IItemStack, amount as float);
composter.setValue(<item:minecraft:diamond>, 0.85);

Parameters:

stack Type: IItemStack - The stack to be compostable
amount Type: float - The amount of Compost that should be added when the item is put in a Composter.