KubeJS Delight

KubeJS Delight

645k Downloads

6.1 cutting recipies don't support chance

FlynnLies opened this issue ยท 3 comments

commented

KubeJS Version: 6.1
The example script from the wiki always produces a diamond as well even when chance is set to 0.
This is not the case in the 6.0 version by the way.

ServerEvents.recipes(event => {
    event.recipes.farmersdelight.cutting(
        "minecraft:cobblestone",
        "#forge:tools/pickaxes", // tool
        [ // results
            "minecraft:iron_ore",
            {
                item: "minecraft:diamond",
                chance: 0
            }
        ],
        "" // sound
    );
commented

Well, I'm pretty sure 6.1 didn't release yet, so I didn't release KubeJS Delight for 6.1 too

commented

Aie, I'm just telling you what i happened to stumble over

commented

The syntax has changed for this, no documentation is available yet as KubeJS 6.1 isn't available yet. It is now Item.of("minecraft:diamond").withChance(0) instead of { item: "minecraft:diamond", chance: 0 }.