# Functionality The tool is [Git hook]-controlled which means once set up, no further user interaction is required and the tool is being executed by your version control automatically. Every time you pull data from the remote repository, the tool will check if your Minecraft instance is up-to-date and will update your mod files accordingly. When you push to your remote repository, the tool will work in the opposite direction.
It will fetch all installed mods from your Minecraft instance and will update your syncing file which can then be uploaded to your repository. Since a lot of data updates for all mods whenever you edit your profile, the tool automatically checks if relevant data has changed and only syncs the parts that are useful for other team members. The order of the mods will always stay the same due to proper sorting and since the sync file is formatted, you will get a clean diff whenever there are updates. **Note:** The tool will only synchronize mod data. Things like the Fabric or Forge version are not analyzed. # Pseudo Code For easier understanding, here is some pseudo-code which describes the functionality: ```js if (postMergeHookTriggered()) { if (mcInstance.isUpToDateWith(syncFile)) { log("No changes detected!"); } else { updateMcInstance(); downloadMissingOrOutdatedMods(); deleteRemovedMods(); } return; } if (prePushHookTriggered()) { if (syncFile.isUpToDateWith(mcInstance)) { log("No changes detected!"); } else { var installedMods = getModsFrom(mcInstance); sortMods(installedMods); var newMods = compareForRelevanceAndMerge(installedMods, syncFile.getMods()); createNewSyncFile(newMods); } return; } ``` [git hook]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks