NeoForge icon indicating copy to clipboard operation
NeoForge copied to clipboard

[1.20.6] Add KnownPacks for mods

Open lukebemish opened this issue 2 months ago • 3 comments

This adds KnownPacks for mod data packs, and allows packs added with AddPackFindersEvent with KnownPacks to actually be used. This has two benefits:

  • large data pack entries do not need to be synced if they come from a known pack, and are recovered on the client from the packs present there
  • Known packs are considered non-experimental (in most circumstances)

KnownPacks for mods are identified by the mod ID and version.

lukebemish avatar May 01 '24 15:05 lukebemish

  • [ ] Publish PR to GitHub Packages

~~Turning this into a draft for now; there appears to be a cap on the number of known packs that can be synced C2S at present -- I need to poke removing that.~~ resolved

lukebemish avatar May 01 '24 20:05 lukebemish

In order to guarantee sensible syncing of known packs, this PR now includes the mod IDs and versions of every mod in a mod file in the pack name and KnownPack for this file -- if we don't do this, we could end up with situations where, say, two mods are in the same file on one end and different files on another end and stuff gets synced via knownpack that is not discoverable via knownpack. I have also updated the system to add knownpacks to packs created by the utility TelepathicGrunt added to AddPackFindersEvent, which adds packs from subfolders of the mod.

lukebemish avatar May 07 '24 20:05 lukebemish