[fabric-resource-loader] [1.16.3] Bundled mod resources do not load in production
Sollace opened this issue ยท 2 comments
I've brought this up twice and have had no answer, so now I'm making an issue for it, because this is an issue.
In my mod I'm extending JsonDataLoader
and registering it like so (along with a few other things):
ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES).registerReloadListener(equipmentList);
It uses the id "hd_skins_equipment" when calling the super constructor (so the JsonDataLoader looks in that directory when loading assets.
I have verified that they are included with the built jar that I distribute for a release, and I have tried placing the jar as-is in the mods folder in case it being an jar-in-jar was the issue. The resource reload listener is call, both in development and in production, as indicated by the message I print to the logs:
HDSkins.logger.info("Found {} potential player equipment sets", resources.size());
In development it works, and prints:
Found 7 potential player equipment sets
In production, it does not work, and prints:
Found 0 potential player equipment sets
The only way I've been able to get it to load them in production is to create an external resourcepack with the necessary files and enable that. As far as I can tell this was not an issue in 1.15, and when it suddenly started happening after updating to 1.16 I had to do a second release because it was causing the mod to crash.
Issue resolved: The problem was that my mod had a pack.mcmeta with format 3. After changing it to format 4 like in my other mods the feature started to work correctly again.
I was also told you're no longer supposed to have a pack.mcmeta, so I removed it and that appears to work as well.