How to Add a Crushing Recipe with KubeJS Create
Basic Crushing Recipe
Crushing recipes are the simplest to add. Use CreateCrushing in a server script and chain .output() for each result. The first output is the primary drop; additional outputs are byproducts.
`js
ServerEvents.recipes(event => {
event.recipes.create.crushing([
'minecraft:iron_nugget',
Item.of('minecraft:iron_nugget', 2).withChance(0.5)
], 'minecraft:iron_ingot')
})
`
Chanced Outputs and Multiple Inputs
Wrap any output in Item.of(...).withChance(...) to make it probabilistic. The chance is a decimal between 0 and 1. You can also pass an array of inputs if the recipe should accept several items, or use a tag like #forge:ingots/iron to match a whole group.
`js
ServerEvents.recipes(event => {
event.recipes.create.crushing(
[Item.of('minecraft:gold_nugget', 3).withChance(0.25), 'minecraft:stone'],
'#forge:ores/gold'
)
})
`
Reload with /reload and test in a Crushing Wheel setup. If a recipe doesn't appear, check the KubeJS log for syntax errors — a single missing comma will silently drop the whole file.