Closed Estecka closed 1 year ago
I've just published a new version of Patched which should fix this issue.
The reason why Patched effectively ignored mod resource/data packs was because Fabric groups all the mod packs into GroupResourcePacks
. This allows for all the packs to be condensed down into one entry in the resource pack screen, at the cost of it being impossible to query individual packs without employing reflection or mixins. This is usually fine for most purposes, as mods shouldn't be querying individual packs anyway. If they did, pack overrides wouldn't work. However, Patched needs to look at each pack since a patch may be provided by any number of packs; they cannot be replaced by each other.
The reason why Fabric ignores the pack.mcmeta
is because that file (and other files in the root of a pack) is ignored when grabbing resources from a grouped pack, which makes sense considering packs really shouldn't be able to override each other's pack metadata. Patched normally sidesteps this issue by looking for the pack.mcmeta
in each individual pack, rather than in the group pack. But it looks like I never took into account the fact that Fabric has its own group pack class (which I probably should have, since Forge has one).
I've gone ahead and applied a fix similar to what I did for Forge's DelegatingPackResources
a while back.
EDIT: After looking at those links it looks like Fabric ignores pack.mcmeta
s regardless. It should be fine to drop a pack.mcmeta
in the root resources
directory, and Patched will still read it. Whether Fabric reads it isn't really important in this case since Patched reads it on its own.
For a moment I feared Fabric would completely discard the file. Glad to see this is not the case. 1.0.2 Is working for me! Thanks for the fix.
Hi,
Loading patches file requires adding a line to
pack.mcmeta
, but as far as I know, this is only possible with "pure" datapacks. Is it possible for PatchedMod to load patch files from another's mod data ? I've tried dropping a mcmeta in the/src/main/resources
of my mod, but fabric ignores it. From what I gathered I seems that Fabric simply doesn't support using this file: https://github.com/FabricMC/fabric/issues/2151#issuecomment-1105488022 https://github.com/orgs/FabricMC/discussions/2626#discussioncomment-4030060(I've created a pure datapack with my patches and mcmeta, and confirmed that they would otherwise work.)