Compare commits

...

13 Commits

Author SHA1 Message Date
Geoff Bourne
99f31d5a9b Restore conditional logic for MeowIce flags (#3647)
Co-authored-by: EmilyxFox <48589793+EmilyxFox@users.noreply.github.com>
2025-09-05 15:57:46 -05:00
Maximilian Berg
155b478ee1 Add UnlockExperimentalVMOptions to MeowIce flags (#3644)
Co-authored-by: maxxberg <max.git@mx-berg.de>
2025-09-05 15:41:27 -05:00
Geoff Bourne
6faa3a379d Revert "move USE_AIKAR_FLAGS=TRUE into else block" (#3645) 2025-09-04 18:28:39 -05:00
EmilyxFox
fc6fcb68e5 move USE_AIKAR_FLAGS=TRUE into else block (#3642) 2025-09-04 16:45:05 -05:00
Geoff Bourne
0da12d1518 cf: remove failed mod downloads (#3641) 2025-09-03 07:23:05 -05:00
dependabot[bot]
a9b4e67d22 build(deps): bump mkdocs-autorefs from 1.4.2 to 1.4.3 in /docs in the patches group (#3640) 2025-09-02 06:44:43 -05:00
Bradley Zylstra
75016e948b Fix for Eternal 2 Modpack (#3637) 2025-08-29 19:29:03 -05:00
Patrick Cudahy
d72db19b4e Fix typo in uname command in start-configuration (#3635) 2025-08-27 08:49:22 -05:00
EmilyxFox
cad2bc1ef6 Add server properties from 25w35a (#3634) 2025-08-26 12:22:12 -05:00
dependabot[bot]
c29430ffc5 build(deps): bump mkdocs-material from 9.6.16 to 9.6.18 in /docs in the patches group (#3633) 2025-08-25 12:33:38 -05:00
dependabot[bot]
7c05109ffa build(deps): bump actions/checkout from 4.2.2 to 5.0.0 (#3632) 2025-08-25 12:28:30 -05:00
Geoff Bourne
ce0f1599de Skip Mohist lookup/download when MOHIST_BUILD provided and server jar exists (#3631) 2025-08-23 17:48:44 -05:00
Geoff Bourne
57a3fe7641 Fix Buffer Limits with SSH Service (#3626) 2025-08-18 21:46:54 -05:00
13 changed files with 196 additions and 180 deletions

View File

@@ -119,7 +119,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4.2.2 uses: actions/checkout@v5.0.0
with: with:
# for build-files step # for build-files step
fetch-depth: 0 fetch-depth: 0

View File

@@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4.2.2 uses: actions/checkout@v5.0.0
with: with:
# for build-files step # for build-files step
fetch-depth: 0 fetch-depth: 0

View File

@@ -43,12 +43,12 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \ --var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz --from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_SERVER_RUNNER_VERSION=1.13.1 ARG MC_SERVER_RUNNER_VERSION=1.13.3
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \ --var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz --from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.48.10 ARG MC_HELPER_VERSION=1.48.11
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION} ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
# used for cache busting local copy of mc-image-helper # used for cache busting local copy of mc-image-helper
ARG MC_HELPER_REV=1 ARG MC_HELPER_REV=1

View File

@@ -1,143 +1,139 @@
# JVM Options # JVM Options
## Memory Limit ## Memory Limit
By default, the image declares an initial and maximum Java memory-heap limit of 1 GB. There are several ways to adjust the memory settings: By default, the image declares an initial and maximum Java memory-heap limit of 1 GB. There are several ways to adjust the memory settings:
- `MEMORY`: "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`) memory heap settings of the JVM - `MEMORY`: "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`) memory heap settings of the JVM
- `INIT_MEMORY`: independently sets the initial heap size - `INIT_MEMORY`: independently sets the initial heap size
- `MAX_MEMORY`: independently sets the max heap size - `MAX_MEMORY`: independently sets the max heap size
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`. The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`.
!!! example "Using docker run" !!! example "Using docker run"
``` ```
-e MEMORY=2G -e MEMORY=2G
``` ```
or to use init and max memory: or to use init and max memory:
``` ```
-e INIT_MEMORY=1G -e MAX_MEMORY=4G -e INIT_MEMORY=1G -e MAX_MEMORY=4G
``` ```
!!! example "Using compose file" !!! example "Using compose file"
``` ```
environment: environment:
MEMORY: 2G MEMORY: 2G
``` ```
or to use init and max memory: or to use init and max memory:
``` ```
environment: environment:
INIT_MEMORY: 1G INIT_MEMORY: 1G
MAX_MEMORY: 4G MAX_MEMORY: 4G
``` ```
To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`. By default, the JVM will use 25% of the container memory limit as the heap limit; however, as an example the following would tell the JVM to use 75% of the container limit of 4GB of memory: To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`. By default, the JVM will use 25% of the container memory limit as the heap limit; however, as an example the following would tell the JVM to use 75% of the container limit of 4GB of memory:
!!! example "MaxRAMPercentage using compose file" !!! example "MaxRAMPercentage using compose file"
``` ```
environment: environment:
MEMORY: "" MEMORY: ""
JVM_XX_OPTS: "-XX:MaxRAMPercentage=75" JVM_XX_OPTS: "-XX:MaxRAMPercentage=75"
deploy: deploy:
resources: resources:
limits: limits:
memory: 4G memory: 4G
``` ```
!!! important !!! important
The settings above only set the Java **heap** limits. Memory resource requests and limits on the overall container should also account for non-heap memory usage. An extra 25% is [a general best practice](https://dzone.com/articles/best-practices-java-memory-arguments-for-container). The settings above only set the Java **heap** limits. Memory resource requests and limits on the overall container should also account for non-heap memory usage. An extra 25% is [a general best practice](https://dzone.com/articles/best-practices-java-memory-arguments-for-container).
## Extra JVM Options ## Extra JVM Options
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS` General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
environment variable. The JVM requires `-XX` options to precede `-X` options, so those can be declared in `JVM_XX_OPTS`. Both variables are space-delimited, raw JVM arguments. environment variable. The JVM requires `-XX` options to precede `-X` options, so those can be declared in `JVM_XX_OPTS`. Both variables are space-delimited, raw JVM arguments.
``` ```
docker run ... -e JVM_OPTS="-someJVMOption someJVMOptionValue" ... docker run ... -e JVM_OPTS="-someJVMOption someJVMOptionValue" ...
``` ```
**NOTE** When declaring `JVM_OPTS` in a compose file's `environment` section with list syntax, **do not** include the quotes: **NOTE** When declaring `JVM_OPTS` in a compose file's `environment` section with list syntax, **do not** include the quotes:
```yaml ```yaml
environment: environment:
- EULA=true - EULA=true
- JVM_OPTS=-someJVMOption someJVMOptionValue - JVM_OPTS=-someJVMOption someJVMOptionValue
``` ```
Using object syntax is recommended and more intuitive: Using object syntax is recommended and more intuitive:
```yaml ```yaml
environment: environment:
EULA: "true" EULA: "true"
JVM_OPTS: "-someJVMOption someJVMOptionValue" JVM_OPTS: "-someJVMOption someJVMOptionValue"
# or # or
# JVM_OPTS: -someJVMOption someJVMOptionValue # JVM_OPTS: -someJVMOption someJVMOptionValue
``` ```
As a shorthand for passing several system properties as `-D` arguments, you can instead pass a comma separated list of `name=value` or `name:value` pairs with `JVM_DD_OPTS`. (The colon syntax is provided for management platforms like Plesk that don't allow `=` inside a value.) As a shorthand for passing several system properties as `-D` arguments, you can instead pass a comma separated list of `name=value` or `name:value` pairs with `JVM_DD_OPTS`. (The colon syntax is provided for management platforms like Plesk that don't allow `=` inside a value.)
For example, instead of passing For example, instead of passing
```yaml ```yaml
JVM_OPTS: -Dfml.queryResult=confirm -Dname=value JVM_OPTS: -Dfml.queryResult=confirm -Dname=value
``` ```
you can use you can use
```yaml ```yaml
JVM_DD_OPTS: fml.queryResult=confirm,name=value JVM_DD_OPTS: fml.queryResult=confirm,name=value
``` ```
## Enable Remote JMX for Profiling ## Enable Remote JMX for Profiling
To enable remote JMX, such as for profiling with VisualVM or JMC, set the environment variable `ENABLE_JMX` to "true", set `JMX_HOST` to the IP/host running the Docker container, and add a port forwarding of TCP port 7091, such as: To enable remote JMX, such as for profiling with VisualVM or JMC, set the environment variable `ENABLE_JMX` to "true", set `JMX_HOST` to the IP/host running the Docker container, and add a port forwarding of TCP port 7091, such as:
!!! example !!! example
With `docker run` With `docker run`
``` ```
-e ENABLE_JMX=true -e JMX_HOST=$HOSTNAME -p 7091:7091 -e ENABLE_JMX=true -e JMX_HOST=$HOSTNAME -p 7091:7091
``` ```
If needing to map to a different port, then also set the environment variable `JMX_PORT` to the desired host port. If needing to map to a different port, then also set the environment variable `JMX_PORT` to the desired host port.
!!! example !!! example
With a compose file: With a compose file:
```yaml ```yaml
environment: environment:
ENABLE_JMX: true ENABLE_JMX: true
JMX_HOST: ${HOSTNAME} JMX_HOST: ${HOSTNAME}
JMX_PORT: "7092" JMX_PORT: "7092"
ports: ports:
- "7092:7092" - "7092:7092"
``` ```
## Enable Aikar's Flags ## Enable Aikar's Flags
[Aikar has done some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. [PaperMC also has an explanation](https://docs.papermc.io/paper/aikars-flags) of what the JVM flags are doing. [Aikar has done some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. [PaperMC also has an explanation](https://docs.papermc.io/paper/aikars-flags) of what the JVM flags are doing.
The set of flags documented there can be added using The set of flags documented there can be added using
-e USE_AIKAR_FLAGS=true -e USE_AIKAR_FLAGS=true
When `MEMORY` is greater than or equal to 12G, then the Aikar flags will be adjusted according to the article. When `MEMORY` is greater than or equal to 12G, then the Aikar flags will be adjusted according to the article.
## Enable MeowIce's Flags ## Enable MeowIce's Flags
[MeowIce has created an updated set of JVM flags](https://github.com/MeowIce/meowice-flags?tab=readme-ov-file#why-would-i-have-to-switch-) based on Aikar's flags but with support for optimizations for Java 17 and above [MeowIce has created an updated set of JVM flags](https://github.com/MeowIce/meowice-flags?tab=readme-ov-file#why-would-i-have-to-switch-) based on Aikar's flags but with support for optimizations for Java 17 and above
The set of flags documented there can be added using The set of flags documented there can be added by setting the environment variable `USE_MEOWICE_FLAGS` to `true`. There is an optional `USE_MEOWICE_GRAALVM_FLAGS` variable to enable GraalVM specific optimizations, defaults to `FALSE`.
-e USE_MEOWICE_FLAGS=true
There is an optional `USE_MEOWICE_GRAALVM_FLAGS` variable to enable GraalVM specific optimizations, defaults to `TRUE` if USE_MEOWICE_GRAALVM_FLAGS is `TRUE`

View File

@@ -414,6 +414,9 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
| HARDCORE | [hardcore](https://minecraft.wiki/w/Server.properties#hardcore) | | HARDCORE | [hardcore](https://minecraft.wiki/w/Server.properties#hardcore) |
| HIDE_ONLINE_PLAYERS | [hide-online-players](https://minecraft.wiki/w/Server.properties#hide-online-players) | | HIDE_ONLINE_PLAYERS | [hide-online-players](https://minecraft.wiki/w/Server.properties#hide-online-players) |
| LOG_IPS | [log-ips](https://minecraft.wiki/w/Server.properties#log-ips) | | LOG_IPS | [log-ips](https://minecraft.wiki/w/Server.properties#log-ips) |
| MANAGEMENT_SERVER_ENABLED | [management-server-enabled](https://minecraft.wiki/w/Server.properties#management-server-enabled) |
| MANAGEMENT_SERVER_HOST | [management-server-host](https://minecraft.wiki/w/Server.properties#management-server-host) |
| MANAGEMENT_SERVER_PORT | [management-server-port](https://minecraft.wiki/w/Server.properties#management-server-port) |
| MAX_CHAINED_NEIGHBOR_UPDATES | [max-chained-neighbor-updates](https://minecraft.wiki/w/Server.properties#max-chained-neighbor-updates) | | MAX_CHAINED_NEIGHBOR_UPDATES | [max-chained-neighbor-updates](https://minecraft.wiki/w/Server.properties#max-chained-neighbor-updates) |
| MAX_PLAYERS | [max-players](https://minecraft.wiki/w/Server.properties#max-players) | | MAX_PLAYERS | [max-players](https://minecraft.wiki/w/Server.properties#max-players) |
| MAX_TICK_TIME | [max-tick-time](https://minecraft.wiki/w/Server.properties#max-tick-time) | | MAX_TICK_TIME | [max-tick-time](https://minecraft.wiki/w/Server.properties#max-tick-time) |
@@ -433,6 +436,7 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
| SIMULATION_DISTANCE | [simulation-distance](https://minecraft.wiki/w/Server.properties#simulation-distance) | | SIMULATION_DISTANCE | [simulation-distance](https://minecraft.wiki/w/Server.properties#simulation-distance) |
| SPAWN_MONSTERS | [spawn-monsters](https://minecraft.wiki/w/Server.properties#spawn-monsters) | | SPAWN_MONSTERS | [spawn-monsters](https://minecraft.wiki/w/Server.properties#spawn-monsters) |
| SPAWN_PROTECTION | [spawn-protection](https://minecraft.wiki/w/Server.properties#spawn-protection) | | SPAWN_PROTECTION | [spawn-protection](https://minecraft.wiki/w/Server.properties#spawn-protection) |
| STATUS_HEARTBEAT_INTERVAL | [status-heartbeat-interval](https://minecraft.wiki/w/Server.properties#status-heartbeat-interval) |
| SYNC_CHUNK_WRITES | [sync-chunk-writes](https://minecraft.wiki/w/Server.properties#sync-chunk-writes) | | SYNC_CHUNK_WRITES | [sync-chunk-writes](https://minecraft.wiki/w/Server.properties#sync-chunk-writes) |
| USE_NATIVE_TRANSPORT | [use-native-transport](https://minecraft.wiki/w/Server.properties#use-native-transport) | | USE_NATIVE_TRANSPORT | [use-native-transport](https://minecraft.wiki/w/Server.properties#use-native-transport) |
| VIEW_DISTANCE | [view-distance](https://minecraft.wiki/w/Server.properties#view-distance) | | VIEW_DISTANCE | [view-distance](https://minecraft.wiki/w/Server.properties#view-distance) |

View File

@@ -1,5 +1,5 @@
mkdocs-material == 9.6.16 mkdocs-material == 9.6.18
mkdocs-autorefs == 1.4.2 mkdocs-autorefs == 1.4.3
mkdocstrings[python] == 0.30.0 mkdocstrings[python] == 0.30.0
mkdocs-literate-nav == 0.6.2 mkdocs-literate-nav == 0.6.2
mdx-gh-links == 0.4 mdx-gh-links == 0.4

View File

@@ -9,6 +9,7 @@ services:
EULA: true EULA: true
ALLOW_FLIGHT: true ALLOW_FLIGHT: true
MOD_PLATFORM: AUTO_CURSEFORGE MOD_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: craftoria CF_SLUG: craftoria
MOTD: | MOTD: |
A %TYPE% server on %VERSION% A %TYPE% server on %VERSION%

View File

@@ -7,7 +7,7 @@ services:
EULA: "TRUE" EULA: "TRUE"
TYPE: MOHIST TYPE: MOHIST
VERSION: 1.12.2 VERSION: 1.12.2
DEBUG: "true" MOHIST_BUILD: 347
volumes: volumes:
- data:/data - data:/data

View File

@@ -170,7 +170,7 @@
"forceIncludes": ["revelationary"] "forceIncludes": ["revelationary"]
}, },
"beyond-depth": { "beyond-depth": {
"forceIncludes": ["particular-reforged"] "forceIncludes": ["particular-reforged"]
}, },
"create-arcane-engineering": { "create-arcane-engineering": {
"forceIncludes": ["just-enough-resources-jer"] "forceIncludes": ["just-enough-resources-jer"]
@@ -184,6 +184,12 @@
}, },
"valhelsia-5": { "valhelsia-5": {
"excludes": ["modernfix"] "excludes": ["modernfix"]
},
"mc-eternal-2": {
"forceIncludes": [
"particular-reforged",
"mob-player-animator"
]
} }
} }
} }

View File

@@ -28,6 +28,9 @@
"level-seed": {"env": "SEED"}, "level-seed": {"env": "SEED"},
"level-type": {"env": "LEVEL_TYPE"}, "level-type": {"env": "LEVEL_TYPE"},
"log-ips": {"env": "LOG_IPS"}, "log-ips": {"env": "LOG_IPS"},
"management-server-enabled": {"env": "MANAGEMENT_SERVER_ENABLED"},
"management-server-host": {"env": "MANAGEMENT_SERVER_HOST"},
"management-server-port": {"env": "MANAGEMENT_SERVER_PORT"},
"max-build-height": {"env": "MAX_BUILD_HEIGHT"}, "max-build-height": {"env": "MAX_BUILD_HEIGHT"},
"max-chained-neighbor-updates": {"env": "MAX_CHAINED_NEIGHBOR_UPDATES"}, "max-chained-neighbor-updates": {"env": "MAX_CHAINED_NEIGHBOR_UPDATES"},
"max-players": {"env": "MAX_PLAYERS"}, "max-players": {"env": "MAX_PLAYERS"},
@@ -61,6 +64,7 @@
"spawn-monsters": {"env": "SPAWN_MONSTERS"}, "spawn-monsters": {"env": "SPAWN_MONSTERS"},
"spawn-npcs": {"env": "SPAWN_NPCS"}, "spawn-npcs": {"env": "SPAWN_NPCS"},
"spawn-protection": {"env": "SPAWN_PROTECTION"}, "spawn-protection": {"env": "SPAWN_PROTECTION"},
"status-heartbeat-interval": {"env": "STATUS_HEARTBEAT_INTERVAL"},
"sync-chunk-writes": {"env": "SYNC_CHUNK_WRITES"}, "sync-chunk-writes": {"env": "SYNC_CHUNK_WRITES"},
"use-native-transport": {"env": "USE_NATIVE_TRANSPORT"}, "use-native-transport": {"env": "USE_NATIVE_TRANSPORT"},
"view-distance": {"env": "VIEW_DISTANCE"}, "view-distance": {"env": "VIEW_DISTANCE"},

View File

@@ -50,7 +50,7 @@ fi
if isTrue "${DEBUG_MEMORY:-false}"; then if isTrue "${DEBUG_MEMORY:-false}"; then
log "Memory usage and availability (in MB)" log "Memory usage and availability (in MB)"
uname -parts uname -pars
free -m free -m
fi fi

View File

@@ -14,38 +14,39 @@ mohistType="${TYPE,,}"
mohistApiUrl="https://api.mohistmc.com/project/${mohistType}" mohistApiUrl="https://api.mohistmc.com/project/${mohistType}"
mohistDownloadsPage="https://mohistmc.com/downloadSoftware?project=${mohistType}" mohistDownloadsPage="https://mohistmc.com/downloadSoftware?project=${mohistType}"
if ! get --exists "${mohistApiUrl}/${VERSION}/builds"; then if [[ "${MOHIST_BUILD}" != "lastSuccessfulBuild" ]] && [[ "${VERSION,,}" != latest ]] && [[ -f "/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar" ]]; then
logError "${mohistType} builds do not exist for ${VERSION}" log "Skipping Mohist build lookup since server jar exists"
logError " check ${mohistDownloadsPage} for available versions" SERVER="/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar"
logError " and set VERSION accordingly" else
exit 1 if ! get --exists "${mohistApiUrl}/${VERSION}/builds"; then
fi logError "${mohistType} builds do not exist for ${VERSION}"
logError " check ${mohistDownloadsPage} for available versions"
if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then logError " and set VERSION accordingly"
# Get the latest build number from the API
if ! buildNumber=$(
get --json-path '$[0].id' "${mohistApiUrl}/${VERSION}/builds"
); then
logError "failed to list ${mohistType} builds for ${VERSION}"
exit 1 exit 1
fi fi
MOHIST_BUILD="${buildNumber}"
fi
downloadUrl="${mohistApiUrl}/${VERSION}/builds/${MOHIST_BUILD}/download" if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then
# Get the latest build number from the API
if ! buildNumber=$(
get --json-path '$[0].id' "${mohistApiUrl}/${VERSION}/builds"
); then
logError "failed to list ${mohistType} builds for ${VERSION}"
exit 1
fi
MOHIST_BUILD="${buildNumber}"
fi
if [[ -z "${downloadUrl}" ]]; then downloadUrl="${mohistApiUrl}/${VERSION}/builds/${MOHIST_BUILD}/download"
logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}"
logError " check ${mohistDownloadsPage} for available versions"
logError " and set VERSION accordingly"
exit 1
fi
SERVER="/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar" if [[ -z "${downloadUrl}" ]]; then
logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}"
logError " check ${mohistDownloadsPage} for available versions"
logError " and set VERSION accordingly"
exit 1
fi
if [ ! -f "${SERVER}" ]; then SERVER="/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar"
log "Downloading ${mohistType^} build ${MOHIST_BUILD} for ${VERSION}" get --skip-existing -o "${SERVER}" "${downloadUrl}"
get -o "${SERVER}" "${downloadUrl}"
fi fi
if [[ "${mohistType}" == "mohist" ]]; then if [[ "${mohistType}" == "mohist" ]]; then

View File

@@ -151,16 +151,19 @@ if isTrue "${ENABLE_JMX}"; then
log "JMX is enabled. Make sure you have port forwarding for ${JMX_PORT}" log "JMX is enabled. Make sure you have port forwarding for ${JMX_PORT}"
fi fi
: "${USE_AIKAR_FLAGS:=false}"
: "${USE_MEOWICE_FLAGS:=false}"
: "${USE_MEOWICE_GRAALVM_FLAGS:=false}"
if isTrue "${USE_MEOWICE_FLAGS}"; then if isTrue "${USE_MEOWICE_FLAGS}"; then
java_major_version=$(mc-image-helper java-release) java_major_version=$(mc-image-helper java-release)
if [[ $java_major_version -gt 16 ]]; then if [[ $java_major_version -gt 16 ]]; then
USE_MEOWICE_GRAALVM_FLAGS="${USE_MEOWICE_GRAALVM_FLAGS:-TRUE}"
log "Java version $java_major_version using MeowIce's flags for Java 17+" log "Java version $java_major_version using MeowIce's flags for Java 17+"
else else
log "Your Java version is $java_major_version, MeowIce's flags are for Java 17+ falling back to Aikar's" log "Your Java version is $java_major_version, MeowIce's flags are for Java 17+ falling back to Aikar's"
USE_MEOWICE_FLAGS=FALSE USE_MEOWICE_FLAGS=FALSE
USE_AIKAR_FLAGS=TRUE
fi fi
USE_AIKAR_FLAGS=TRUE
fi fi
if isTrue "${USE_AIKAR_FLAGS}"; then if isTrue "${USE_AIKAR_FLAGS}"; then
@@ -221,6 +224,7 @@ fi
if isTrue "${USE_MEOWICE_FLAGS}"; then if isTrue "${USE_MEOWICE_FLAGS}"; then
JVM_XX_OPTS="${JVM_XX_OPTS} JVM_XX_OPTS="${JVM_XX_OPTS}
-XX:+UnlockDiagnosticVMOptions -XX:+UnlockDiagnosticVMOptions
-XX:+UnlockExperimentalVMOptions
-XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1SATBBufferEnqueueingThresholdPercent=30
-XX:G1ConcMarkStepDurationMillis=5 -XX:G1ConcMarkStepDurationMillis=5
-XX:+UseNUMA -XX:+UseNUMA