mezz / JustEnoughItems

Item and Recipe viewing mod for Minecraft
https://www.curseforge.com/minecraft/mc-mods/jei
MIT License
771 stars 301 forks source link

r329 has some issues with minetweaker and recipe changes #537

Closed utoc closed 7 years ago

utoc commented 7 years ago

No crash!

Relevant log entries: https://gist.github.com/utoc/7720ce2543acfe057f8f5fac6a22c85d Full client log: https://gist.github.com/utoc/9095f2eb0ef434dc8881679f29bddd56

Scripts: https://github.com/utoc/bbqscripts

Running JEI r329, FML 2109, CraftTweaker-1.10.2-3.0.13, ModTweaker2-2.0.5

Using the above with newest JEI beta release, no minetweaker tweaked recipes showed up; instead shown were only default mod recipes. I reverted JEI to r328 and the problem was alleviated.

IE, the following blood altar recipe found here: https://github.com/utoc/BBQScripts/blob/master/bloodmagic.zs loaded correctly as seen from the log above but when clicking the item in JEI, I was given the default BM recipe. Let me know if screenshots would do a better job of explaining.

Please let me know if I have made the above post in error. Thank you for all the work you do, mezz.

Shadows-of-Fire commented 7 years ago

Can confirm MT recipes aren't shown in JEI 329, with forge 2111, and the same corresponding craftweaker and modtweaker versions. Recipes do correctly change, attempting to craft by the default recipe still shown causes nothing to output, but JEI refuses to show them.

BlayTheNinth commented 7 years ago

Having the same issue here; a call tojeiHelpers.reload() (or reloading the resource pack, which according to source should also trigger a reload) doesn't seem to actually call IModPlugin.register(IModRegistry) again, so it's only called once at the moment, in mine (and MineTweaker's) case too early.

Additionally it would be nice to have jeiHelpers.requireReloadOnWorldLoad() or something and have JEI handle it from there. As it is now we'll have 3+ mods (examples: MineTweaker, Ex Nihilo Adscensio, Ex Compressum) each manually triggering a reload on world load, unnecessarily increasing load time.

mezz commented 7 years ago

JEI needs to do its heavy lifting in PostInit, if I do it at world load it's not a good user experience and can cause a server disconnect from taking too long. So far issues have been resolved in JER and Reliquary, and I'll continue to look into these problems as they come up. I've been busy with TextureDump today but should have some time tomorrow to start looking into these.

mezz commented 7 years ago

reload() for JEI was only ever intended for use by Mod/Mine/CraftTweaker when a player is editing recipes and does /mt reload. Using it during normal startup is not intended.

mezz commented 7 years ago

@blay09 it looks like ExNihilio Adscensio loads registries on PostInit, and JEI loads on PostInit, so you just need to sandwich yourself in between like this: @Mod(blahStuff, dependencies = "after:exnihiloadscensio;before:JEI") You should probably also bother them to load it earlier, but that's not a big deal.

I will work on the ModTweaker reload issue separately. That should clear up the problems in Ex Compressum.

BlayTheNinth commented 7 years ago

Right, I'll try that. It used to load in FMLModIdMappings on the 1.9 branch but it seems they've since fixed that. Didn't realize, sorry.

In case you'll be working with the *Tweaker dev, please ensure JEI is reloaded after MineTweaker's Reload event is handled; that's another place where I need to re-generate recipes in case scripts changed the originals from Adscensio/Omnia.

mezz commented 7 years ago

Yes, that makes sense. Everyone should have time to react to the minetweaker reload event before JEI is reloaded.

AEnterprise commented 7 years ago

as for the loading of blocks/items/...: forge is moving towards a new system where there would be a seperate event for when to load those things to avoid these kinds of issues

jawsawn commented 7 years ago

Also recipes doesn't show up from the Crafting Harmonics

mezz commented 7 years ago

@JAWSAWN please post a new issue. and link your client log from https://gist.github.com/.

utoc commented 7 years ago

This is working now, thank you @mezz!