BlakeBr0 / IronJetpacks

Adds fully customizable FE powered jetpacks!
https://blakesmods.com/iron-jetpacks
MIT License
13 stars 21 forks source link

Cannot change jetpack recipes #82

Closed Octelly closed 9 months ago

Octelly commented 10 months ago

Describe the bug KubeJS isn't able to replace IronJetpacks recipes

To Reproduce Try to replace recipes with KubeJS

Expected behavior Recipes should be changed

Screenshots / Scripts / Logs Here's the janky script I use:

function jetpacks(event) {
    event.remove({ mod: 'ironjetpacks' })
    event.remove({ id: /ironjetpacks:.*/ })
    event.remove({ mod: 'mekanism', output: /mekanism:.*jetpack.*/ })
    event.remove({ output: MEK('module_jetopack_unit') })

    function capacitor(tier) {
        event.shaped(Item.of('ironjetpacks:capacitor', `{Id:"ironjetpacks:${tier}"}`), [
            'MMM',
            'EEE',
            'MMM'
        ], {
            M: F(`#ingots/${tier}`)
        })
    }

    capacitor('iron')
    event.shaped(Item.of('ironjetpacks:jetpack', '{Id:"ironjetpacks:iron",Throttle:1.0d}'), [
        'SCS',
        'MBM',
        ' M '
    ], {
        S: 'create_dd:steel_ingot',
        C: MEK('basic_control_circuit'),
        M: MC('iron_ingot'),
        B: Item.of('ironjetpacks:cell', '{Id:"ironjetpacks:iron"}')
    })

    function tier(previous_tier, tier, control_circuit) {
        capacitor(tier)

        event.shaped(Item.of('ironjetpacks:jetpack', `{Id:"ironjetpacks:${tier}",Throttle:1.0d}`), [
            'MCM',
            'MJM',
            'MBM'
        ], {
            M: F(`#ingots/${tier}`),
            C: control_circuit,
            J: Item.of('ironjetpacks:jetpack', `{Id:"ironjetpacks:${previous_tier}",Throttle:1.0d}`),
            B: Item.of('ironjetpacks:capacitor', `{Id:"ironjetpacks:${tier}"}`)
        })
    }

    tier('iron', 'steel', MEK('advanced_control_circuit'))
    tier('steel', 'diamond', MEK('elite_control_circuit'))
    tier('diamond', 'emerald', MEK('ultimate_control_circuit'))
}

Versions (please complete the following information):

BlakeBr0 commented 10 months ago

If you set the craftingMaterial value in the jetpack JSON to "null" it won't generate the default recipes for that jetpack. You'll also have to re-add the recipes for all the crafting components for that jetpack.

Octelly commented 9 months ago

@BlakeBr0 Oh! I had no idea. You should totally mention that in the docs (unless I'm just blind and didn't notice).

Sorry for bothering you in that case, haha. :heart:

(I'll look into it later today, it is currently morning for me)

Octelly commented 9 months ago

image Yeah, the documentation makes it sound like you have to include a material.

Although (and I just noticed this) you do use "null" by default in the creative jetpack's JSON.

Anyway, thank you for your help, everything seems to work perfectly now!