Skip to content

3. KubeJS (.js)

HiKoNe21 edited this page Nov 21, 2026 · 2 revisions

Example shapeless

ServerEvents.recipes(event => {

    event.recipes.artwork.basic_shapeless(
        '1x minecraft:milk_bucket',
        [
            'minecraft:bucket'
        ]
    ) 
    .secondary([
        { ingredient: 'minecraft:egg', count: 1, catalyst: true },
        { ingredient: 'minecraft:bone_meal', count: 4 },
        { ingredient: 'minecraft:brush', damage: 7 }
    ])
    .extra([
        { id: 'minecraft:diamond' },
        { id: 'minecraft:diamond', chance: 0.5 },
        { id: 'minecraft:diamond', count: 2, chance: 0.5 }
    ])
    .fluid('500x minecraft:lava')
    .tier([ 0, 1, 2 ])
    .experience({ required: 30, consume: 3 })
    .sound('minecraft:block.beehive.enter');
})

Example shaped

ServerEvents.recipes(event => {

    event.recipes.artwork.blacksmith_shaped(
        '1x minecraft:milk_bucket',
        [
            "I  I",
            "IIII"
        ],
        {
            I: 'minecraft:iron_ingot'
        }
    ) 
    .secondary([
        { ingredient: 'minecraft:egg', count: 1, catalyst: true },
        { ingredient: 'minecraft:bone_meal', count: 4 },
        { ingredient: 'minecraft:brush', damage: 7 }
    ])
    .extra([
        { id: 'minecraft:diamond' },
        { id: 'minecraft:diamond', chance: 0.5 },
        { id: 'minecraft:diamond', count: 2, chance: 0.5 }
    ])
    .fluid('500x minecraft:lava')
    .experience({ required: 30, consume: 3 })
    .sound('minecraft:block.beehive.enter');
})

Clone this wiki locally