Closed codetaylor closed 6 years ago
Omg! 😍
I'll test and merge this as soon as I wake up tomorrow (caught up in something else at the moment). This looks great tho!
Looks like the part that I could never figure out was the simplest part of all https://github.com/codetaylor/soulus/blob/fix-issue-37/src/main/java/yuudaari/soulus/Soulus.java#L173-L175
It's funny, seeing this similar code in ex nihilo creatio and your mods I could never wrap my head around what was happening, and looking at the changes you made to my own code, I finally understand. I also understand how simple it is. I feel kinda dumb now.
This change delays the processing of all Soulus specific recipe additions and removals until after CraftTweaker (CT) has processed its recipes in its PostInit phase.
A soft, order-only dependency on crafttweaker was added to the mod's
@Mod
annotation to ensure that if CT is available, Soulus will be loaded after it, therefore processing its PostInit event after CT.In Soulus' PostInit handler, a call to the
ZenComposer::apply()
is made to apply aggregatedIAction
implementations in the proper order.Creation of the recipes, specifically the resolution of oredict ingredients has been moved to the respective
IAction#apply()
methods to ensure that mods and CT scripts have ample time to manipulate the oredict entries before resolution.Tested using the script provided in #37 :
The granite recipe added after the removal is not removed.
Also tested in reverse:
Again, the soulus specific granite recipe added is not removed because the removals are processed before the additions. This behavior conforms to CT behavior and the behavior of most mods that implement CT, as well as expected and accepted behavior by pack developers.
Three new entries were also added to the
.gitignore
to prevent project contamination by Intellij users.