#How do I remove recipe that results in an item with a component?

9 messages · Page 1 of 1 (latest)

low stream
#

Iron's Restrictions adds a manuscript item which has dynamic recipes generated based on the spell school.
We're trying to remove those recipes, but they refuse to get removed.

Examples of what we tried (not working):

ServerEvents.recipes(event => {
  //Didn't remove the recipe for any of the existing variants.
  event.remove({not:{type:'eidolon_repraised:worktable'},output:Item.of('irons_restrictions:manuscript')})
  //Tried specifying this for each school, still didn't work. This is the correct component and value for the output.
  event.remove({not:{type:'eidolon_repraised:worktable'},output:Item.of('irons_restrictions:manuscript').set('irons_restrictions:school_component','irons_spellbooks:fire')})
  //Tried this format at first since it seemed to make the most sense for this purpose but it errored
  event.remove({not:{type:'eidolon_repraised:worktable'},output:Item.of('irons_restrictions:manuscript[irons_restrictions:school_component=irons_spellbooks:fire]')})
})
fading ravenBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

near meteor
#

Could this be an interaction with other KubeJS scripts in your modpack?
We just tried it in ours and the first line removes them just fine.
Though from the start we are not seeing any recipe for ' irons_restrictions:manuscript' in type 'eidolon_repraised:worktable'. Which means either there is a third mod or a KubeJS script integrating them together which could interfere.

If the Modpack you are using is publicly available, we could give it a try, since we are currently working on a similar issue anyway

low stream
#

So ... the script structure we had to remove the default recipes, and then add the manuscripts (and Iron's spellbooks eldritch) into eidolon via the worktable (Magic workbench, in-game), is as follows:

hearty gazelleBOT
#

Paste version of EidoJS_Manuscripts.js from @low stream

low stream
#

Which ... still shows the old craft recipes for all manuscripts with a component, while Eldritch works fine as it has no components

I've re-added the first line into the script within the event.remove field to test, but first loading into a world didn't seem to do it

Also, doing /kubejs reload and /reload to then reload the datapacks will break the dynamic manuscripts, which while ironically it adds the desired static recipe only to the Eidolon: Repraised's Magic Workbench, is a known bug

#

As for other scripts, we have a script to remove certain loot id from showing up via all possible fields, as we're still trying to figure out where to put those, if at quest rewards, so on
It did have a remove loot to not have any dynamic and eldritch manuscript showing inside chests or to make it so wouldn't be dropped by entities and so on, but even removing from the lines didn't seem to change how the former script behaved

hearty gazelleBOT
#

Paste version of LootJS_LootRemoval.js from @low stream

low stream
#

And two shots of how the Eldritch Manuscript shows in EMI, and how the dynamic Evocation Manuscript shows in-game, inside the Magic Workbench

The output also works fine, interacting with it just provides you with the item, so it's mainly just being able to remove the default recipes somehow, which we haven't been having much success ...

As for other {Kube}JS mods, we also have MoreJS, which we have considered removing as we use VillagerConfig and at the current moment we don't change that many trades; we have EntityJS, which we might just outright remove; KubeJS eidolon, to make it so being able to make the script called EidoJS and inject it into the worktable is possible; and LootJS, which we use to currently remove all relics in-game