Supercharge Your Hytale Modding Workflow with mdevtools
Source: Dev.to
Introduction
Tired of restarting your server every time you change a line of code?
In this guide we’ll set up mdevtools to enable hot‑reloading for your Hytale modding environment. By creating a tight loop between your Gradle build and your running server, you can iterate faster and stay in the flow.
I’m actively using this exact workflow to build the procedural‑generation systems for Vex’s Dungeon Challenge. When you’re tweaking complex dungeon logic or iterating on gameplay mechanics, saving those 30‑second restart loops saves hours of development time each week.
Getting mdevtools
-
Grab the latest
mdevtoolsJAR from CurseForge:
Download mdevtools -
Place the JAR in the appropriate location for your project:
| Project Type | Destination Path |
|---|---|
| Standard Template (mbround18) | data/server/Server/builtin |
| Custom Setup | Create a builtin folder in your server root and drop the JAR there |
Manifest Configuration
Ensure your hytale-mod.json (or equivalent manifest) contains the dependency fields:
{
"Dependencies": {},
"OptionalDependencies": {}
}
Note: For single‑mod development, leaving these objects empty is fine; they just need to be present.
Gradle Task – Install Mod JAR
Add the following task to your build.gradle file. It builds your mod JAR and copies it to the server’s mods folder.
// In build.gradle
tasks.register("installModJar", Copy) {
// 1. Build the jar first
dependsOn ":plugins:yourmod:jar"
// 2. Grab the output file
from { project(":plugins:yourmod").tasks.named("jar").flatMap { it.archiveFile } }
// 3. Drop it into the server mods folder
into file("data/server/Server/mods")
}
Development Loop Script
Create a lightweight Bash script (dev-reload.sh) in your project root and make it executable (chmod +x dev-reload.sh).
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Configuration
WATCH_DIR="plugin/src"
BUILD_TASK="installModJar" # Must match the Gradle task above
JAR_NAME="plugin-name-0.1.0.jar"
JAR_SOURCE="./plugin/build/libs"
JAR_DEST="data/server/Server/mods"
DEBOUNCE_SECONDS=5
last_build_time=0
build_and_copy() {
# Run the Gradle task we created
./gradlew "$BUILD_TASK"
}
hard_reload() {
build_and_copy
# NOTE: UI assets do NOT hot reload.
# If you have new UI files, uncomment lines below to rebuild assets zip.
# ./gradlew assetsZip \
# && cp "dist/$(ls dist | grep -m1 -E 'assets.*\.zip')" "$JAR_DEST/"
echo "Restarting Docker container..."
docker compose restart
echo "Hard reload complete."
}
echo "=========================================================="
echo " Hytale Dev Loop: Ready."
echo " [r] Reload Code (Hot)"
echo " [h] Hard Reload (Restart Container + UI)"
echo " [e] Exit"
echo "=========================================================="
while true; do
printf "> "
IFS= read -r -n1 key
echo
case "$key" in
r|R)
now=$(date +%s)
if (( now - last_build_time < DEBOUNCE_SECONDS )); then
echo "Debounced. Wait a moment before reloading again."
continue
fi
last_build_time=$now
echo "Rebuilding and hot‑swapping..."
build_and_copy
;;
h|H)
echo "Hard reload requested..."
hard_reload
;;
e|E)
echo "Exiting."
break
;;
*)
# Ignore other keys
;;
esac
done
Running this script gives you a terminal dashboard:
- r – Rebuild and hot‑swap code (no server restart).
- h – Hard reload (restarts the Docker container and reloads UI).
- e – Exit the loop.
UI Development
While mdevtools handles Java code hot‑reloading, Hytale UI files (.ui) still require a hard reload to see changes. To catch UI errors early, use the Hytale UI Ultimate VS Code extension. It provides:
- Syntax highlighting for
.uifiles. - Diagnostics for invalid group names and missing attributes.
- Import navigation (Ctrl+Click) to jump between UI files.
Pair this extension with the hard‑reload (h) command from the script for a robust workflow.
Conclusion
With the installModJar Gradle task, the dev-reload.sh script, and the VS Code UI extension, you now have a fast, automated development loop. No more manual file moves or long boot times—just press r to inject new code instantly or h for a full reload when UI changes are needed.
Happy modding!