2.7 KiB
2.7 KiB
Server Modpack Repository
This repository contains the automated modpack synchronization system for the Minecraft server hosted at jianfgit.xyz.
Overview
This system automatically:
- Monitors the server's mod list (
/tmp/server_mods.txt) - Creates a minimal client modpack in Modrinth format
- Packs the modpack with corresponding TACZ gun packs
- Commits and pushes updates to this git repository when changes are detected
- Increments version numbers using decimal versioning (0.0.1, 0.0.2, etc.)
- Runs every 12 hours via systemd timer
Files
sync_modpack.sh- Main synchronization scriptmodpack/modrinth.index.json- Modrinth format modpack indexstate/mods.json- Current list of required mods (for change detection)state/gunpacks.json- Current list of TACZ gun packs (for change detection)VERSION- Current version number of the modpackREADME.md- This file
Modrinth Format
The modpack follows the Modrinth index format with:
- Format version: 1
- Game: Forge 1.20.1
- Environment: Client required, Server unsupported
- Files: All mods and gunpacks with SHA1 hashes
Installation & Setup
The system is already configured and running on the server. To manually trigger a sync:
/tmp/mod_repo/sync_modpack.sh
Versioning
- Version format: Major.Minor.Patch (e.g., 0.0.1)
- Only the patch number is incremented on each change (0.0.1 → 0.0.2 → 0.0.3)
- This ensures that even small mod changes trigger a new version, preventing version conflicts
- Critical: Mod versions must match exactly for clients to connect to the server
TACZ Gun Packs
TACZ gun packs are stored in the tacz/ directory and included in the modpack index.
The system automatically detects new gun packs added to this directory.
Monitoring
Check the status of the automated sync:
# Check timer status
systemctl list-timers --all | grep modpack
# Check service logs
journalctl -u modpack-sync.service -f
# Check current version
cat /tmp/mod_repo/VERSION
Manual Mod Addition
To add a new mod to the server:
- Place the mod
.jarfile in/home/minecraft/mods/ - Add the mod name (without version) to
/tmp/server_mods.txt - The next sync cycle (or manual run) will detect the change and update the modpack
Troubleshooting
If the sync fails:
- Check the service logs:
journalctl -u modpack-sync.service - Verify git connectivity:
ssh -T -p 220 git@jianfgit.xyz - Ensure the script is executable:
ls -l /tmp/mod_repo/sync_modpack.sh - Check disk space:
df -h /tmp
License
This system is internal to the jianfgit.xyz Minecraft server infrastructure.