How to Configure Custom Recipes Using KubeJS
Writing Custom Sapper Recipes
If you have KubeJS installed, you can define custom extraction fluids and valid tree blocks for the Sapper. In your KubeJS server scripts, register a sapping recipe using event.recipes.rubberworksSapping.
The syntax takes the output fluid (specifying fluid ID and millibucket amount) followed by an array of valid block IDs that can be tapped. For example, to pull milk from oak trees:
`js
event.recipes.rubberworksSapping(Fluid.of("minecraft:milk", 40), ["minecraft:oak_log", "minecraft:oak_leaves"])
`
Writing Custom Compressor Recipes
You can also configure custom fluid-to-item compression rules for the Compressor using event.recipes.rubberworksCompressing.
The compression method accepts the output item (with count) and the input fluid (with amount). You can chain .heated() onto the end of the declaration if the recipe requires heat to press the liquid:
`js
event.recipes.rubberworksCompressing(Item.of("minecraft:diamond", 2), Fluid.of("minecraft:water", 500)).heated()
`
Save your script and reload your server or game to apply the newly coded recipes to your machines.