#chances&byproducts

11 messages · Page 1 of 1 (latest)

hollow drum
#

how to add byproduct chance example-->from crushing(Create) netherack to get cinder flour(Create) and 5%of netherithe nugget(Cyclic)

teal oasisBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

somber lion
#

Item.of('item id').withChance(0.05) is 5%

#

and for multiple outputs, you just need to put the output in a list

hollow drum
#

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

idle wigeon
#
event.custom({
  type: "create:crushing",
  ingredients: [
    Ingredient.of("inputid").toJson()
  ],
  processingTime: 400,
  results: [
    Ingredient.of("outputid").toResultJson(),
    Ingredient.of("outputid").withChance(0.05).toResultJson()
  ]
})
hollow drum
#

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

short mortarBOT
#

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)
})