Apotheosis

Apotheosis

81M Downloads

Disabling certain potion charms

DaytonaBlep opened this issue ยท 4 comments

commented

I'm trying to make the flying charm uncraftable with kubejs, but the crafting recipes for all charms are removed too.

commented

Can't help without seeing your script

commented
ServerEvents.recipes(event => {
    [
     Item.of('minecraft:potion', '{Potion:"apotheosis:extra_long_flying"}').strongNBT(),
    ].forEach((ingredientID) => event.remove({input: ingredientID}));
})
ServerEvents.recipes(event => {
    [
     Item.of('minecraft:potion', '{Potion:"apotheosis:extra_long_flying"}')
    ].forEach((ingredientID) => event.remove({input: ingredientID}));
})
ServerEvents.recipes(event => {
    event.remove({ input: 'minecraft:potion', '{Potion:"apotheosis:extra_long_flying"}' })
})

Same result for all variants, all charms are uncraftable. And not only charms, everything in the modpack that uses potions in the recipe, it's about 60~ items

commented

Charm crafting is controlled by a single dynamic recipe; removing it will remove charm crafting entirely, and it does not have a blacklist.

Whatever issue you are seeing that removes everything using potions is just a result of the script being bad, but the functionality you want to accomplish is impossible.

commented

@Shadows-of-Fire you could add a mobeffect blacklist tag and check it when you're also checking .isInstantenous()