Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces integration for Almost Unified.
I tried integrating it with the existing
ModCompatsystem. Feel free to remove it and just make use of theAlmostUnifiedAdapter. It already guards against class access if the mod is not loaded via the nested static class. The implementation makes Almost Unified a soft dependency.The current use case is the
ItemStackFromIngredientclass, which will make use of the adapter to resolve the stored tag to the preferred item. I would suggest not caching the resolved stack in the class in case the Almost Unified config changes (the mod is fully reloadable). The performance impact should be negligible because it's a simple map lookup on our side.I tested the implementation with Integrated Dynamics via Maven local. The Mechanical Squeezer makes use of the
ItemStackFromIngredientclass for its outputs. I was able to fully reload config changes and see the expected results in the recipe. The mod still works normally if Almost Unified is not present.Because Almost Unified takes priority over its own mod priority system, it may be a good idea to mention this in the config option right here: https://github.com/CyclopsMC/IntegratedDynamics/blob/master-1.21-lts/src/main/java/org/cyclops/integrateddynamics/GeneralConfig.java#L127-L128
If Almost Unified can't provide the preferred item for the tag, the implementation will fall back to the previous behavior. This integration simplifies modpack work because it fetches the mod priorities from a single point of truth. To fully support all features of Almost Unified, I may add a pull request to Integrated Dynamics too.