Shadows-of-Fire / Placebo

A library mod
MIT License
23 stars 22 forks source link

recipes are likely to be missing when multiple mods try to modify return value of `ReloadableServerResources.listeners` #64

Closed Frefreak closed 1 year ago

Frefreak commented 1 year ago

e.g. Fluidized-Tanks mod when installed along with apotheosis (and placebo) will results in the missing of hellshelf recipes and others (due to setReturnValue cancels others?)

https://github.com/Rongmario/Fluidized-Tanks/blob/master/src/main/java/zone/rong/fluidizedtanks/mixin/ReloadableServerResourcesMixin.java#L19-L23

For a proof and temp fix for a modpack if I add the RecipeManager to listeners for placebo in fluidized-tanks mixin class the recipes will be back.

I understand this is not a bug strictly, just want to let you know this will happens. Is there any possibility to use other api to register recipes instead of using mixin to improve robustness.

Shadows-of-Fire commented 1 year ago

The placement of that stupid piece of code is extremely fragile and I can't move it lest I get every recipe editing mod come down bearing hellfire

I really should just remove it, but that won't be happening for 1.19.x, so you should probably try to convince the other mod to use the forge AddReloadListenersEvent instead of a mixin.