InitRecipeTypes may not register all recipe types
mezz opened this issue ยท 0 comments
Describe the bug
Vanilla RecipeTypes are created in AE2 using InitRecipeTypes
.
They use a deferred registration, so they are statically created and call appeng.init.InitRecipeTypes#register
, and then later get registered when RegisterEvent
is fired for Registries.RECIPE_TYPE
and appeng.init.InitRecipeTypes#init
is called.
Unfortunately, if a RecipeType's parent class is not called before the registration stage, the RecipeType will call appeng.init.InitRecipeTypes#register
after appeng.init.InitRecipeTypes#init
has already run, and it will never get registered with the vanilla system.
How to reproduce the bug
Put a breakpoint in appeng.init.InitRecipeTypes#init
and see if all the recipe types are present.
The ones I know of are
EntropyRecipe.TYPE;
ChargerRecipe.TYPE;
InscriberRecipe.TYPE;
MatterCannonAmmo.TYPE;
TransformRecipe.TYPE;
In my experience, MatterCannonAmmo.TYPE
and EntropyRecipe.TYPE
are missing from the registration.
Expected behavior
All AE2 recipe types should be registered with the vanilla system when the registry event is fired.
Additional details
I ran across this issue when working on updating JEI AE2 integration for 1.21.1 https://github.com/Tamaized/AE2-JEI-Integration
Which minecraft version are you using?
1.21
On which mod loaders does it happen?
NeoForge
Crash log
https://gist.github.com/mezz/89aa0b9e8821e512d98ada6de15155bc