diff --git a/README.md b/README.md index 7e223df..ef6c67f 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ The following variables can be configured: | `ALLOW_OP` | Do you wish to allow operators or not | `true` | | `AUTH_MODE` | Authentication mode (authenticated or offline) | `authenticated` | | `AUTOMATIC_UPDATE` | Update the hytale server automatically | `true` | +| `JVM_ARGS` | Additional Java Virtual Machine arguments for advanced configuration. | See egg config | | `LEVERAGE_AHEAD_OF_TIME_CACHE` | The server ships with a pre-trained AOT cache (HytaleServer.aot) that improves boot times by skipping JIT warmup | `true` | | `DISABLE_SENTRY` | Disable Sentry during active plugin development. Hytale uses Sentry to track crashes. Disable it to avoid submitting your development errors | `true` | | `ENABLE_BACKUPS` | Enable automatic backups | `false` | diff --git a/egg-hytale.json b/egg-hytale.json index 54da9cb..f5e813d 100644 --- a/egg-hytale.json +++ b/egg-hytale.json @@ -4,7 +4,7 @@ "version": "PLCN_v3", "update_url": "https://raw.githubusercontent.com/NATroutter/egg-hytale/refs/heads/main/egg-hytale.json" }, - "exported_at": "2026-01-11T21:52:21+00:00", + "exported_at": "2026-01-11T22:16:24+00:00", "name": "Hytale", "author": "contact@natroutter.fi", "uuid": "6594b287-2d7b-4249-bc93-4d40283c57e3", @@ -156,6 +156,18 @@ ], "sort": 5 }, + { + "name": "JVM Arguments", + "description": "Additional Java Virtual Machine arguments for advanced configuration.\n\nWarning: Improper JVM settings can lead to poor performance, crashes, or failure to start. Only modify if you understand what these parameters do.", + "env_variable": "JVM_ARGS", + "default_value": "-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1", + "user_viewable": false, + "user_editable": true, + "rules": [ + "string" + ], + "sort": 11 + }, { "name": "Leverage Ahead-Of-Time Cache", "description": "The server ships with a pre-trained AOT cache (HytaleServer.aot) that improves boot times by skipping JIT warmup. See https://openjdk.org/jeps/514", diff --git a/start.sh b/start.sh index 2c58c7e..3729751 100644 --- a/start.sh +++ b/start.sh @@ -44,7 +44,12 @@ fi # Add max memory if set and greater than 0 if [ -n "${SERVER_MEMORY}" ] && [ "${SERVER_MEMORY}" -gt 0 ] 2>/dev/null; then - JAVA_CMD="${JAVA_CMD} -Xmx${SERVER_MEMORY}M" + JAVA_CMD="${JAVA_CMD} -Xms${SERVER_MEMORY}M -Xmx${SERVER_MEMORY}M" +fi + +# Add JVM arguments if set +if [ -n "${JVM_ARGS}" ]; then + JAVA_CMD="${JAVA_CMD} ${JVM_ARGS}" fi JAVA_CMD="${JAVA_CMD} -jar HytaleServer.jar"