A bash script to safely update GT New Horizons client instances in Prism Launcher, following the official update instructions.
- Clones your existing instance (preserves the original)
- Replaces
config,mods, andserverutilitiesfolders automatically - Handles Java 17+ files (
libraries,patches,mmc-pack.json) - Auto-detects Prism Launcher instances folder
- Dry-run mode to preview changes before applying
- Non-interactive mode for automation
- Supports
.zip,.tar.gz, and.tararchives
- Bash 4.0+ (Git Bash on Windows)
tarorunzip(depending on archive format)curlorwget(only if downloading from URL)
./update.sh [OPTIONS]| Option | Description |
|---|---|
-i, --instance DIR |
Path to your current GTNH instance folder (required) |
-n, --name NAME |
Name for the new/updated instance (required) |
-u, --url URL |
Download URL for the new client version |
-f, --file FILE |
Path to already downloaded client archive |
-p, --prism-dir DIR |
Prism instances folder (auto-detected if not set) |
-j, --java17 |
Using Java 17+ (also replaces libraries, patches, mmc-pack.json) |
--dry-run |
Simulate the update without making changes |
-y, --yes |
Skip confirmation prompt |
-h, --help |
Show help message |
Update from a downloaded archive:
./update.sh -i ~/.local/share/PrismLauncher/instances/GTNH_2.8.1 \
-n "GTNH 2.8.4" \
-f ~/Downloads/GT_New_Horizons_2.8.4_Client.zipUpdate with Java 17+ and skip confirmation:
./update.sh -i /path/to/GTNH_instance -n "GTNH 2.8.4" -f client.zip --java17 --yesDownload and update in one step:
./update.sh -i /path/to/GTNH_instance -n "GTNH 2.8.4" \
-u "https://example.com/gtnh-client.zip" --java17Preview what would happen (dry-run):
./update.sh -i /path/to/instance -n "GTNH New" -f client.zip --dry-runCustom Prism instances folder (e.g., Windows with custom path):
./update.sh -i "D:/PrismInstances/GTNH_2.8.1" \
-n "GTNH 2.8.4" \
-f client.zip \
-p "D:/PrismInstances"- Downloads the new client version (if URL provided)
- Clones your existing instance to a new folder
- Removes old folders:
config,mods,serverutilities(andscripts,resourcesif present) - Removes Java 17+ files if
--java17flag is set - Extracts new client files from the archive
- Installs new folders to the cloned instance
- Installs Java 17+ files if
--java17flag is set - Updates instance name in configuration
The script auto-detects these standard locations:
| OS | Path |
|---|---|
| Linux | ~/.local/share/PrismLauncher/instances/ |
| Linux (Flatpak) | ~/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/ |
| macOS | ~/Library/Application Support/PrismLauncher/instances/ |
| Windows | %APPDATA%/PrismLauncher/instances/ |
| Windows (Scoop) | %HOMEPATH%/scoop/persist/prismlauncher/instances/ |
If you have a custom location, use --prism-dir to specify it.
- Launch Prism Launcher - The new instance should appear
- Review settings - Check Java arguments if using Java 17+
- Test the instance - Launch and verify everything works
For Java 17+ setup, see: https://github.com/GTNewHorizons/lwjgl3ify
bash update_test.shMIT License - see LICENSE for details.
Contributions are welcome! Please feel free to submit issues or pull requests.
- gtnh-server-updater - Server-side update script