Botania

Botania

133M Downloads

[Feature Update]: Move Lexicon Building to Server Start to support 1.13 data packs as well as CraftTweaker/ModTweaker Changes

Lanse505 opened this issue ยท 8 comments

commented

@williewillus

Conversation from Discord:

williewillus - Today at 5:52 PM
when are scripts loaded, world start?
a simple solution would be to just delay the lexicon loading until world start (and reload it every world switch)
we probably should be doing that anyway since recipes are now customizable per-world in vanilla 1.13
throw something about the above on an issue ticket if you haven't already and I can go from there, it shouldn't be too much effort
Simon (Lanse505) - Today at 5:53 PM
-------------------------------------------------------
Jared - Today at 5:52 PM
scripts are loaded during the Register<IRecipe>
but the recipes are done in postinit
-------------------------------------------------------

But yea I'll create an issue ticket about it
williewillus - Today at 5:53 PM
cool so building the lexicon on server start should be a good solution
commented

clarification question: what kind of recipes is this for? for crafting recipes, we only store the ID of the recipes on startup (e.g. botania:spreader_0), and the lexicon retrieves the actual recipes in real time from the registry to render them.

(cc. @jaredlll08)

(botania's apothecary/runealtar/etc. recipes store the raw object though so the original problems apply to those)

commented

I think @Vyraal1 can provide some input on this as well.
As he was the mod dev I was talking to that raised the issue of recipes not syncing properly.

commented

This would be specifically for the recipes in Botania's own crafting mechanics (Runic Altar, Apothecary, Alfheim Portal). They render properly in JEI, but the Lexicon doesn't currently update them.

commented

hmmm this will be tricky since those recipes do not have unique identifiers (like an ID or something), and there isn't a good way to add them without breaking binary compat

commented

Currently, when you use ModTweaker to add a Crafting Page to the Lexicon, the Lexicon displays the recipe output but does not render the actual recipe. Is that related to this open issue here? If not I can make a separate issue for it, just doing my due diligence checking for already open issues on the subject.

commented

lucidobserver and I are having the same issue. Here are the two scripts I'm using to modify, say, the Gaia pylon:

omogaia.zs: Gates Gaia I behind End and Omothol

recipes.remove(<botania:pylon:2>);

recipes.addShaped("botania_gaiapylon",<botania:pylon:2>,[[<abyssalcraft:stone:6>, <botania:manaresource:8>, <abyssalcraft:stone:6>],[<abyssalcraft:ethaxiumingot>, <botania:pylon>, <abyssalcraft:ethaxiumingot>], [<abyssalcraft:stone:6>, <botania:manaresource:8>, <abyssalcraft:stone:6>]]);

zLexiconTweaks.zs: lexicon changes

import mods.botania.Knowledge;
import mods.botania.Lexicon;

Lexicon.removePage("botania.entry.gaiaRitual",1);
Lexicon.addCraftingPage("botania.page.gaiaRitual1","botania.entry.gaiaRitual",1,"crafttweaker:botania_gaiapylon");

and here's what the result looks like:
gaia_pylon_page

commented

Done in 1.14

commented

This issue is stale because it has been open for a while with no activity. Remove stale label or comment or this will be closed soon.