#splashing Recipie with % outputs

5 messages · Page 1 of 1 (latest)

cosmic quest
#

Hey everyone! 👋

I’m building a Create-based modpack and running into trouble defining a washing recipe in KubeJS.

Goal:
When washing sand:

It should drop copper nuggets (or copper) as the main output.

It should also have a 20% chance to drop iron nuggets (or iron) as a secondary output.

Setup:

Minecraft: 1.21.1

Loader: NeoForge

Mods: Latest versions of Create, Create Addons, and KubeJS

Problem:
I can’t get the multiple outputs and drop chances to behave correctly. I’m not sure if my syntax is wrong or if Create’s recipe format has changed for 1.21.

Could someone please show an example of a Create washing recipe with multiple outputs and weighted chances written in KubeJS?

Thanks a lot for the help! 🙏

velvet wharfBOT
#

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

violet fox
#

In 1.20.1 a chanced item output looked like this:
Item.of('minecraft:iron_nugget', 2).withChance(0.125)

In 1.21.1 a chanced item output looks like:
CreateItem.of('2x minecraft:iron_nugget', 0.125)

// requires: kubejs_create

ServerEvents.recipes(event => {
  event.recipes.create.splashing([
    CreateItem.of('create:copper_nugget'),
    CreateItem.of('minecraft:iron_nugget', 0.20)
  ], 'minecraft:sand').id('kubejs:splashing/sand')
})
cosmic quest
#

ok i shall test it and be back thansk

#

omd thats amazing thanks iv been trying this for like 3 days thanks