
First breakpoint was in the static {} block of RecipeBookClient which loops through all recipes and sets up tabs for them. This clinit is called in Minecraft.init(), near the very end of PREINIT, due to a call to Minecraft.populateSearchTreeManager which references this class for the first time.
JSON recipes, however, are loaded right after that at the very beginning of INIT. This means that json recipes and any code recipes registered after preinit will not appear in the book.
A solution is to move the clinit logic to a method to nuke and rebuild the tabs on-the-fly. Note that Minecraft.populateSearchTreeManager probably needs to be rerun on reload as well if we're going to nuke the tabs and stuff in RecipeBookClient.
Probably could call the "nuke and reload" method from populateSearchTreeManager then call populateSearchTreeManager itself from the SearchTreeManager which implements IResourceReloadListener and thus will reload at LOADCOMPLETE
@tterrag1098 added labels [Bug]
this fixed by 1c24600?
Theoretically yes, I'd like someone to test with custom recipes before i close tho.
works for both my json and code recipes
Most helpful comment
works for both my json and code recipes