-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.21.3] Implement builtin mod resource/data pack sorting #4070
base: 1.21.3
Are you sure you want to change the base?
[1.21.3] Implement builtin mod resource/data pack sorting #4070
Conversation
I think this is fine, I havent looked at it in depth, but the idea seems solid. I think we discussed this before, but are we happy to have this in the fabric.mod.json as opposed to the pack.mcmeta file? I think im happy either way. This clearly needs some tests, if you want some help setting up multiple testmods for one module let me know, it should be tottaly possible to do. |
It would be possible to move this to the |
I have added 3 blank test mods, hopefully this will help you make some tests out of them. I also made some small code cleanup/changes with unit testing in mind, but ran out of time. Feel free to take a look at this, if not I might come back to it. |
I've tried getting the testmod to load but it crashes with |
Sorry I missed this. Where are you seeing this problem? |
...ce-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader/ModResourcePackUtil.java
Outdated
Show resolved
Hide resolved
This occurs when trying to run |
Finally have a few tests in using the three test mods. |
f0daa6b
to
07a1871
Compare
Overriding data/resource pack files from other mods is currently quite difficult as mod loading order isn't consistent. This can be especially annoying for compatibility mods that exist to override data/resource files from other mods.
This PR addresses the issue by implementing a system for mods to define in their fabric.mod.json what their priority is in the internal Fabric Mods data/resource pack relative to other mods. For example, a pack that overrides trees from a biome mod can set itself to load above the biome mod's datapack internally to make sure files are consistently overriden.
Mods that wish to change their priority relative to other in the load order can add this to their fabric.mod.json file:
Mods in the
before
list will load their resources before/under the mod, mods in theafter
list will load their resources after/above the mod.