Difficulty overriding Patchouli pages with KubeJS scripts
MuteTiefling opened this issue ยท 4 comments
I'm trying to create custom recipes for Enigmatica 6 Expert and I'm hitting a bit of a wall with Occultism's Rituals.
Currently, the mod is structured such that the recipes only show in their Patchouli manual. The entries are hard coded, not linked to the recipe, probably due to the complicated nature of these recipes. So, in order to successfully override the recipe and notify the player of the change, I'd need to alter the recipe and manually edit the patchouli entries.
However, E6E is set up as two packs in one with a packmode switch to get to Expert. I've successfully injected altered recipes without issue, but I cannot seem to get the book to update in a way that'll work for this.
Since it's two packs in one, I can't simply drop in a JSON override for the patchouli pages as I've done in other cases, since that would impact Normal mode too. Instead, KubeJS has the ability to insert a JSON file through code, which I've used for other applications such as creating data overrides for Tetra. Normally this would allow me to only inject these pages when Expert is selected. Unfortunately it doesn't appear to work here. I think it's a load order issue of some sort where the Patchouli book data always ends up loading over top of the injected book data, so the book just never updates.
Would you, perhaps, have any ideas on why this might be the case or how to resolve it?
Additional context
Below is the script itself if you're interested. I had tried a couple methods and then finally just tried injecting the raw JSON without anything fancy (was trying to make building the list a little easier). I'm not getting any errors, it just never shows in the book, even after a full restart.
ritual_entries.txt
Botania has a hard dependency on Patchouli, is it possible to add json recipes to the book without this dependency?
This issue is stale because it has been open for a while with no activity. Please bump if this is still an issue, or this ticket will be closed soon.
So in 1.17, I have plans to let book contents be loaded through the resource pack system, which would allow overrides to the content system via the resource system everyone is familiar with.
In the interim, I'd suggest trying to ask that mod to un-hardcode their recipes from the book. They can check out Botania to see how you can have json-driven recipes shown in the book properly.