A quick script written in both Kotlin/JVM and Dart that help you update your mods/mod-pack to all the players without restarting the game or downloading it in game which require additional mod it compatible with already downloaded and existing mods
you can set up it and use it whatever if you have mods or planning on add mods
-
First of all host your mods on GitHub, create a GitHub repository using command line or GitHub web interface and upload all the mods in it, update it when you need
-
Download the executable script, you can find it in the GitHub releases, ask all players to download it too
-
Prepare the command which is used before every launch (everytime):
java -jar .\syncMinecraftMods.jar {githubRepoOwnerName} {githubRepoName}
replace {githubRepoOwnerName} with your GitHub username and {githubRepoName} with the GitHub repository
example:
java -jar .\syncMinecraftMods.jar ellet0 the-fantastic-team-mods-fabric
-
Move the file to
.minecraft
Example on MultiMc launcher:
C:\Users\{username}\AppData\Roaming\MultiMc\instances\1.20.4(1)\.minecraft
Example on official Minecraft launcher:C:\Users\{username}\AppData\Roaming\.minecraft
-
Java installation is required to run the Jar file if you are using the Java version, it's also required to run Minecraft in custom launchers, official minecraft launcher download already download it, but it will be installed internally
That's it, but to run the script there are two ways:
-
The manual setup: Create bat script with your command in step 3 and paste it, Make a shortcut to it into the Desktop, and ask the player to run it before launching the game or ask everytime in a while when you update the mods
-
The automatic setup: if the players are using custom launchers like MultiMc, there is probably a place to run command before launching the game, for MultiMc, click on edit instance, go the settings, then custom commands, enable it and paste your command in Pre-launch text field, but one change to it, instead of hardcode the path to the jar file, use extra environment variables like
$INST_MC_DIR
(MultiMc), it will be something like this:
java -jar $INST_MC_DIR\syncMinecraftMods.jar {githubRepoOwnerName} {githubRepoName}
You need to update the mods into GitHub repository either by command line or the gui on GitHub web, once the players run the script they will get your updates into their local machines
We have written the exact same script for both Java and Dart
- Require Java to be installed on the user system
- The same jar file work on Windows/macOS/Linux
- Doesn't require Java to be installed
- Needs to be compiled for different operating systems which means you need to download different file depending on your operating system, for now we will only compile for Windows
If you are not sure what to choose, try out both or choose anything