promotional bannermobile promotional banner

KubeJS Roots

Adds KubeJS support for the Roots Classic

KubeJS Roots

Adds support for Roots Classic in 1.21 including recipes, and custom rituals, spells, and mutations.

Recipes

ServerEvents.recipes(event => {
    let { rootsclassic } = event.recipes

    // Creates a ritual recipe for the grow ritual
    rootsclassic.ritual('rootsclassic:grow',
        ['bone_meal', 'apple'], // Input ingredients
        ['bone', 'porkchop'],   // Incense items to burn
        0, '#aabbcc'              // Altar level and color
    )

    // Creates a mortar recipe
    rootsclassic.component(
        'minecraft:tnt',        // Output item
        ['gunpowder', 'gunpowder', 
        'gunpowder', 'gunpowder'],// Input ingredients
    )

    // and a spell powder recipe
    rootsclassic.component(
        'rootsclassic:spell_powder',  // Spell powder item to record effect data
        ["oak_button", "oak_button", 
        "oak_button", "oak_button"],// Input ingredients
        'kubejs:boom',                  // The spell to apply to the powder
        true                            // Needs to be true for spell recipes
    )
})

Custom Ritual

StartupEvents.registry('rootsclassic:ritual', event => {
    event.create('big_boom')
        // The effect that will be run when the ritual is completed
        .ritualEffect(context => {
            let { level, pos } = context;
            level.createExplosion(pos.x, pos.y, pos.z)
                .strength(8)
                .explosionMode('tnt')
                .causesFire(true)
                .explode()
        })
})

When you perform a ritual in the altar, it runs with the following steps:

  1. Started count down for the progress time (Think it as some kind of CD or process time)
  2. Run the ritual effect

Custom Spell

StartupEvents.registry('rootsclassic:component', event => {
    event.create('boom')
        .sourceItem('acacia_boat')
        .manaCost(8)                // 2 leaves in the bar
        .spellEffect(context => {   // The effect that will be run when the spell is cast
            let { caster, level } = context
            level.createExplosion(caster.x, caster.y, caster.z)
                .strength(4)
                .causesFire(true)
                .explode()
        })
})

Custom Mutation

RootsEvents.mutagen(event => {
    // Mutating a dandelion into a TNT block
    event.add('kubejs:test', "minecraft:tnt", "minecraft:dandelion", builder => {
        // Extra items to be thrown near the dandelion
        builder.inputs('acacia_button')
        // The effect that will be run if the mutation is successful
        builder.onCrafted((block, player) => player.potionEffects.add('regeneration', 1000, 0))
        // Additional conditions to be met for the mutation to be successful
        builder.matches((items, block, player) => player.xpLevel > 10)
    })
})

The KubeJS Roots Team

profile avatar
  • 17
    Followers
  • 11
    Projects
  • 16.0M
    Downloads

More from AmygdaloideaeView all

  • ProbeJS project image

    ProbeJS

    • 6.6M
    • Mods

    Greatly enhances your KubeJS scripting experience by adding VSCode support.

    • 6.6M
    • May 21, 2026
    • Mods
    • +1
  • ProbeJS Legacy project image

    ProbeJS Legacy

    • 31.0K
    • Mods

    Unofficial continuation of ProbeJS for versions abandoned by official ProbeJS

    • 31.0K
    • May 14, 2026
    • Mods
    • +2
  • KubeJS Create project image

    KubeJS Create

    • 45.3M
    • Mods

    KubeJS Create integration

    • 45.3M
    • November 12, 2025
    • Mods
  • PowerfulJS project image

    PowerfulJS

    • 2.5M
    • Mods

    KubeJS integration for Forge's Capability system, including Curios, Botania, FE and fluid handling.

    • 2.5M
    • October 14, 2025
    • Mods
    • +2
  • ProbeJS project image

    ProbeJS

    • 6.6M
    • Mods

    Greatly enhances your KubeJS scripting experience by adding VSCode support.

    • 6.6M
    • May 21, 2026
    • Mods
    • +1
  • ProbeJS Legacy project image

    ProbeJS Legacy

    • 31.0K
    • Mods

    Unofficial continuation of ProbeJS for versions abandoned by official ProbeJS

    • 31.0K
    • May 14, 2026
    • Mods
    • +2
  • KubeJS Create project image

    KubeJS Create

    • 45.3M
    • Mods

    KubeJS Create integration

    • 45.3M
    • November 12, 2025
    • Mods
  • PowerfulJS project image

    PowerfulJS

    • 2.5M
    • Mods

    KubeJS integration for Forge's Capability system, including Curios, Botania, FE and fluid handling.

    • 2.5M
    • October 14, 2025
    • Mods
    • +2