Skip to content

Chance-based outputs in kubejs? #5

Description

@4AC11

When making other Create recipes, I have been able to make certain outputs chance-based, for example:
event.recipes.createCrushing([
'5x geode:wrappist_shard',
Item.of('geode:wrappist_shard').withChance(0.5),
], 'geode:wrappist_cluster')

The "withChance" bit at the end allows me to make the chance of output 50%

I'm not sure if I'm just doing it wrong, but I have this script here:
event.recipes.createMechanicalExtruderExtruding(Item.of('minecraft:slime_ball').withChance(0.05),[
Fluid.of('minecraft:water'),
Fluid.of('create_things_and_misc:slime')]).withCatalyst('minecraft:slime_block')

I like the recipe, but want it to give less output because it seems way too overpowered for how much SU the extruder consumes. My first thought was to add a low chance for the output.

The recipes remains the same (giving one slimeball per bonk) no matter whether the "withChance" is there or not. If this is a problem of me not typing the script right, please tell me, but I figure this is probably just a matter of the Extruder not supporting chance-based outputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions