Skip to content

Releases: pablo67340/CurseforgeSync

CurseforgeSync 1.0.1

Choose a tag to compare

@pablo67340 pablo67340 released this 19 Aug 21:30

Fixes a bug that could leave two versions of the same mod in mods/ after a pack update, which prevents a Forge server from starting.

The problem

Installs were decided from the filesystem, but removals were decided only from config/curseforgesync-state.json. If that record was missing or incomplete, the new version of a mod was downloaded while the old one stayed behind.

The most likely way to hit this was the very first sync on a server whose mods were already installed some other way — for example a server built from the pack by hand or by the CurseForge launcher. Nothing in the state file claimed responsibility for those jars, so when the pack updated a mod, its old copy was left in place.

The fix

  • After installing, both tracked and strict mode now sweep mods/ for older copies of the mods just installed
  • Stale copies are identified by reading mod IDs out of the jars themselves, so this works even when the state file is missing, deleted, or was never written
  • Jars that declare no mod are never matched, and protectedFiles still wins, so a build you placed by hand on purpose survives

If you were affected, just update and restart — the next sync cleans up the duplicates on its own. No need to clear the mods folder.

Note

Mods that the pack dropped entirely are still left alone in tracked mode when there is no state file to identify them, since there is no way to tell them apart from jars you added yourself. They are harmless, unlike duplicates. Use strict mode if you want the mods folder mirrored exactly.

CurseforgeSync 1.0.0

Choose a tag to compare

@pablo67340 pablo67340 released this 19 Aug 16:12

Point your server at a CurseForge modpack and it keeps itself in sync every boot — before Forge scans for mods. Old versions deleted, new ones installed, client-only mods filtered out automatically.

What's in it

  • Syncs your mods folder against a CurseForge modpack at every server start-up
  • Installs new mods, deletes old versions, leaves hand-added jars alone
  • Runs before Forge scans for mods, so changes apply in the same boot
  • Skips client-only mods; sorts resource packs and shaders out of mods/
  • Optional strict mode mirrors the pack exactly
  • Dry-run mode and a built-in command-line tool for testing

Setup

  1. Put the jar for your Minecraft version in mods/.
  2. Start the server once. It writes config/curseforgesync.json.
  3. Copy the number from the Project ID box on your pack's CurseForge page into modpackProjectId.
  4. Restart.
{
  "modpackProjectId": 885460
}

To see what a sync would do without touching anything, every jar is also a CLI:

java -jar curseforgesync-1.19.2-1.0.0.jar --dir ./myserver --pack 885460 --dry-run --verbose

Downloads

Minecraft Forge Jar
1.7.10 10.13.4.1614 curseforgesync-1.7.10-1.0.0.jar
1.12.2 14.23.5.2860 curseforgesync-1.12.2-1.0.0.jar
1.16.5 36.2.42 curseforgesync-1.16.5-1.0.0.jar
1.19.2 43.5.2 curseforgesync-1.19.2-1.0.0.jar
1.20.6 50.2.10 curseforgesync-1.20.6-1.0.0.jar
1.21.11 61.2.0 curseforgesync-1.21.11-1.0.0.jar
26.1.2 64.1.0 curseforgesync-26.1.2-1.0.0.jar
26.2 65.1.1 curseforgesync-26.2-1.0.0.jar

Note

CurseforgeSync will not appear in your server's mod list, and that is expected. Forge deliberately skips mod-scanning any jar that provides a transformation service — which is exactly the mechanism that lets it run before mod loading.

Full documentation is in the README.