Apotheosis

Apotheosis

70M Downloads

[1.16.3] causes a hard crash to the reload listener

raziel23x opened this issue ยท 3 comments

commented

Forge 34.1.15
Apotheosis-1.16.3-4.3.1.jar

Latest Log
https://gist.github.com/raziel23x/fe4b1b7f5f5c1e09e1902ab58f1df7ad

something is causing the reload listener to hard crash preventing other mods like
https://github.com/sinkillerj/ProjectE/tree/mc1.16.x
which i am helping out with the port for 1.16.3
to lose EMC values on all craftable recipe items which use the default minecraft base materials even the vanilla craftable recipe items until i manually use the /reload command which then all craftable items regain the EMC values again

found this same issue with
BluSunrize/ImmersiveEngineering#4364
so made a separate error report over on this tracker already

the problem does not occur when this mod is not enabled

I have tested this against projectE as the base item with seeing emc values with just these 2 mod as well as just projectE and the above ImmersiveEngineering issue above and both does the same thing enabled EMC vanishes until i run /reload manually and when disabled EMC mapping happens without issue due to being able to use the reload listener

commented

pupnewfsterToday at 2:44 PM
Na, recipes and tags both exist, it is a bug in his TagIngredient (that the vanilla one does not share). Tags exist (that is how the recipes can have them), the issue is his ingredient is using his static tag object or something which has not been populated yet (and he is correct is not valid). It has to do with how tags are in multi stages:

  • they reload and populate the collections
  • recipes then reload (as they require tags exist)
  • all other reload listeners run
  • if there were no errors then the tag collection is "valid" and gets updated and populates all INamedTags with the proper elements so that they can be used as accessors (even though they are not the actual object in the tag collection)

pupnewfsterToday at 2:48 PM
I have done a lot of work with the internals of tags/tag collections and the like in 1.16.2/3 when working on a system to expose custom tag types properly and then even more when fixing forge's IOptionalNamedTag system.

Tags are rather complicated in how they actually work internally so my guess is he just doesn't realize that tag isn't valid for purposes of the recipe yet, maybe using an IOptionalNamedTag would fix it but I am not sure... Reading the tag from the correct tag collection will fix it.

commented

pupnewfsterToday at 2:57 PM
https://github.com/Shadows-of-Fire/Placebo/blob/1.16/src/main/java/shadows/placebo/recipe/TagIngredient.java#L70 Well I am not sure that fully works "properly" in terms of if it gets called super late I forget about how tag collections are if it will add it and add the values to it (I think it will)...
But it definitely is using the wrong collection for deserialization as TagCollectionManager.getManager().getItemTags() is the one that has the tags that recipe lookup is supposed to use (at least during deserialization... not that he deserializes anything)

commented

This is a bug in ProjectE, their reload listener is attempting to invoke recipes before tags are available, which is invalid behavior.