#chances&byproducts
11 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Item.of('item id').withChance(0.05) is 5%
and for multiple outputs, you just need to put the output in a list
i have lost all my knowledge about kubejs and i cant understand it. how would that custom recipe looked
and how would be cobblestone be haunted to netherack while removing recipe for blackstone
event.custom({
type: "create:crushing",
ingredients: [
Ingredient.of("inputid").toJson()
],
processingTime: 400,
results: [
Ingredient.of("outputid").toResultJson(),
Ingredient.of("outputid").withChance(0.05).toResultJson()
]
})
ServerEvents.recipes(event => {event.custom({
type: "create:crushing",
ingredients: [
Ingredient.of("minecraft_netherrack").toJson()
],
processingTime: 400,
results: [
Ingredient.of("create:cinder_flour").toResultJson(),
Ingredient.of("cyclic:cinder_flour").withChance(0.5).toResultJson(),
Ingredient.of("cyclic:netherite_nugget").withChance(0.05).toResultJson()
]
})
})
is this wrong
becasue it doesnt show in jei even theres no errors
You can write your code in a codeblock by typing it between the codeblock delimiters:
```js :arrow_left:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
``` :arrow_left:
As an example, :arrow_up: will look like this:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})