mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-25 10:36:24 +00:00
Added arclight and nanolimbo types and Meowice flags (#3485)
This commit is contained in:
@@ -4,16 +4,18 @@ export TARGET
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
os_major_version=$(awk -F'[= ."]+' '/^VERSION_ID=/{ print $2 }' /etc/os-release)
|
||||
|
||||
# Install and configure dnf
|
||||
microdnf install dnf -y
|
||||
dnf install 'dnf-command(config-manager)' -y
|
||||
dnf config-manager --set-enabled ol8_codeready_builder
|
||||
dnf config-manager --set-enabled ol${os_major_version}_codeready_builder
|
||||
|
||||
# Add EPEL repository
|
||||
tee /etc/yum.repos.d/ol8-epel.repo <<EOF
|
||||
[ol8_developer_EPEL]
|
||||
tee /etc/yum.repos.d/ol${os_major_version}-epel.repo <<EOF
|
||||
[ol${os_major_version}_developer_EPEL]
|
||||
name=Oracle Linux \$releasever EPEL (\$basearch)
|
||||
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/\$basearch/
|
||||
baseurl=https://yum.oracle.com/repo/OracleLinux/OL${os_major_version}/developer/EPEL/\$basearch/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
|
||||
@@ -8,10 +8,10 @@ By default, the image declares an initial and maximum Java memory-heap limit of
|
||||
- `INIT_MEMORY`: independently sets the initial 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"
|
||||
|
||||
|
||||
```
|
||||
-e MEMORY=2G
|
||||
```
|
||||
@@ -23,7 +23,7 @@ The values of all three are passed directly to the JVM and support format/units
|
||||
```
|
||||
|
||||
!!! example "Using compose file"
|
||||
|
||||
|
||||
```
|
||||
environment:
|
||||
MEMORY: 2G
|
||||
@@ -48,7 +48,7 @@ To let the JVM calculate the heap size from the container declared memory limit,
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 4G
|
||||
memory: 4G
|
||||
```
|
||||
|
||||
!!! important
|
||||
@@ -68,7 +68,7 @@ docker run ... -e JVM_OPTS="-someJVMOption someJVMOptionValue" ...
|
||||
```yaml
|
||||
environment:
|
||||
- EULA=true
|
||||
- JVM_OPTS=-someJVMOption someJVMOptionValue
|
||||
- JVM_OPTS=-someJVMOption someJVMOptionValue
|
||||
```
|
||||
|
||||
Using object syntax is recommended and more intuitive:
|
||||
@@ -112,7 +112,7 @@ If needing to map to a different port, then also set the environment variable `J
|
||||
!!! example
|
||||
|
||||
With a compose file:
|
||||
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
ENABLE_JMX: true
|
||||
@@ -131,3 +131,13 @@ The set of flags documented there can be added using
|
||||
-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.
|
||||
|
||||
## 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
|
||||
|
||||
The set of flags documented there can be added using
|
||||
|
||||
-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`
|
||||
|
||||
@@ -12,7 +12,7 @@ Run a Bukkit/Spigot server type by setting the environment variable `TYPE` to "B
|
||||
```
|
||||
docker run ... -e TYPE=SPIGOT ...
|
||||
```
|
||||
|
||||
|
||||
Compose
|
||||
```yaml
|
||||
environment:
|
||||
@@ -50,3 +50,16 @@ Canyon is on a temporary hiatus, so by default the final build from GitHub will
|
||||
|
||||
-e CANYON_BUILD=6
|
||||
-e CANYON_BUILD=26
|
||||
|
||||
### Poseidon
|
||||
|
||||
[Poseidon](https://github.com/retromcorg/Project-Poseidon) is a fork of CraftBukkit for Minecraft Beta 1.7.3. It includes multiple enhancements whilst also retaining compatibility with old Bukkit plugins.
|
||||
|
||||
-e VERSION=b1.7.3 -e TYPE=CANYON
|
||||
|
||||
!!! important
|
||||
Only `VERSION=b1.7.3` is supported. Since that version pre-dates the health check mechanism used by this image, that will need to be disabled by setting `DISABLE_HEALTHCHECK=true`.
|
||||
|
||||
### Uberbukkit
|
||||
|
||||
[Uberbukkit](https://github.com/Moresteck/uberbukkit) is a fork of CraftBukkit for Minecraft Beta with Multi version support, supports b1.0 - b1.7.3
|
||||
|
||||
@@ -84,3 +84,10 @@ A [Catserver](http://catserver.moe/) type server can be used with
|
||||
-e TYPE=CATSERVER
|
||||
|
||||
> **NOTE** Catserver only provides a single release stream, so `VERSION` is ignored
|
||||
|
||||
### Arclight
|
||||
|
||||
A [Arclight](https://arclight.izzel.io/) type server can be used with
|
||||
|
||||
-e TYPE=ARCLIGHT
|
||||
-e ARCLIGHT_TYPE=NEOFORGE,FORGE,FABRIC
|
||||
|
||||
@@ -39,6 +39,12 @@ Configuration options with defaults:
|
||||
|
||||
Instead of using format codes in the MOTD, Limbo requires [JSON chat content](https://minecraft.wiki/w/Raw_JSON_text_format#Java_Edition). If a plain string is provided, which is the default, then it gets converted into the required JSON structure.
|
||||
|
||||
## NanoLimbo
|
||||
|
||||
A [NanoLimbo](https://github.com/Nan1t/NanoLimbo) server can be run by setting `TYPE` to `NANOLIMBO`.
|
||||
|
||||
An alternate Limbo server
|
||||
|
||||
## Crucible
|
||||
|
||||
A [Crucible](https://github.com/CrucibleMC/Crucible) server can be run by setting `TYPE` to `CRUCIBLE`.
|
||||
@@ -65,4 +71,4 @@ Alternatively, the final `-jar` invocation can be replaced by setting `CUSTOM_JA
|
||||
|
||||
When using `docker run` make sure to quote the entire value since it has spaces in it, such as
|
||||
|
||||
-e CUSTOM_JAR_EXEC="-cp worldedit.jar:Carpet-Server.jar net.minecraft.server.MinecraftServer"
|
||||
-e CUSTOM_JAR_EXEC="-cp worldedit.jar:Carpet-Server.jar net.minecraft.server.MinecraftServer"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
!!! warning
|
||||
|
||||
The variables listed on this page are manually documented and may be out-of-date or inaccurate.
|
||||
The variables listed on this page are manually documented and may be out-of-date or inaccurate.
|
||||
|
||||
All other documentation pages are actively maintained, so please use the search box above to find the desired topic.
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>TZ</code></td>
|
||||
<td>You can configure the timezone to match yours by setting the TZ environment variable.
|
||||
<td>You can configure the timezone to match yours by setting the TZ environment variable.
|
||||
|
||||
alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
|
||||
@@ -81,6 +81,18 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
<td><code>false</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>USE_MEOWICE_FLAGS</code></td>
|
||||
<td><a href="https://github.com/MeowIce/meowice-flags?tab=readme-ov-file#why-would-i-have-to-switch-">MeowIce has created an updated set of JVM flags</a> based on Aikar's flags but with support for optimizations for Java 17 and above</td>
|
||||
<td><code>false</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>USE_MEOWICE_GRAALVM_FLAGS</code></td>
|
||||
<td>enables MeowIce's flags for GraalVM if USE_MEOWICE_GRAALVM_FLAGS is TRUE</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>JVM_OPTS</code></td>
|
||||
<td>General JVM options can be passed to the Minecraft Server invocation by passing a <code>JVM_OPTS</code> environment variable. The JVM requires -XX options to precede -X options, so those can be declared in <code>JVM_XX_OPTS</code>. Both variables are space-delimited, raw JVM arguments</td>
|
||||
@@ -711,7 +723,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
### CurseForge
|
||||
|
||||
!!! tip
|
||||
|
||||
|
||||
Refer to the [main documentation page](types-and-platforms/mod-platforms/auto-curseforge.md) for more details and up-to-date information.
|
||||
|
||||
<table>
|
||||
|
||||
@@ -274,6 +274,10 @@ case "${TYPE^^}" in
|
||||
exec "${SCRIPTS:-/}start-deployLimbo" "$@"
|
||||
;;
|
||||
|
||||
NANOLIMBO)
|
||||
exec "${SCRIPTS:-/}start-deployNanoLimbo" "$@"
|
||||
;;
|
||||
|
||||
CRUCIBLE)
|
||||
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
|
||||
;;
|
||||
@@ -282,11 +286,19 @@ case "${TYPE^^}" in
|
||||
exec "${SCRIPTS:-/}start-deployLeaf" "$@"
|
||||
;;
|
||||
|
||||
ARCLIGHT)
|
||||
exec "${SCRIPTS:-/}start-deployArcLight" "$@"
|
||||
;;
|
||||
|
||||
POSEIDON)
|
||||
exec "${SCRIPTS:-/}start-deployPoseidon" "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
logError "Invalid TYPE: '$TYPE'"
|
||||
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
|
||||
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH,"
|
||||
logError " CANYON, LIMBO, CRUCIBLE, LEAF, YOUER, BANNER"
|
||||
logError " CANYON, LIMBO, NANOLIMBO, CRUCIBLE, LEAF, YOUER, BANNER"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
|
||||
41
scripts/start-deployArcLight
Executable file
41
scripts/start-deployArcLight
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
isDebugging && set -x
|
||||
|
||||
resolveVersion
|
||||
: "${ARCLIGHT_RELEASE:=latest}"
|
||||
: "${ARCLIGHT_TYPE:=neoforge}"
|
||||
|
||||
arclightReleasesUrl=https://api.github.com/repos/IzzelAliz/Arclight/releases
|
||||
if [[ ${ARCLIGHT_RELEASE^^} = LATEST ]]; then
|
||||
arclightReleaseUrl=${arclightReleasesUrl}/latest
|
||||
else
|
||||
arclightReleaseUrl=${arclightReleasesUrl}/tags/${ARCLIGHT_RELEASE}
|
||||
fi
|
||||
|
||||
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /arclight-${ARCLIGHT_TYPE,,}-${VERSION}-.*\.jar/)].browser_download_url" \
|
||||
--accept "application/vnd.github.v3+json" "$arclightReleaseUrl"); then
|
||||
logError "Failed to access ${ARCLIGHT_RELEASE} release of Arclight"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $downloadUrl = null ]]; then
|
||||
logError "Failed to locate Arclight jar for $VERSION from ${ARCLIGHT_RELEASE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Downloading Arclight from $downloadUrl"
|
||||
if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then
|
||||
logError "Arclight jar from $downloadUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE="${ARCLIGHT_TYPE,,}"
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
@@ -28,5 +28,6 @@ if [ ! -f ${SERVER} ]; then
|
||||
fi
|
||||
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE=forge
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
|
||||
@@ -56,5 +56,6 @@ fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE=forge
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
|
||||
@@ -40,5 +40,6 @@ fi
|
||||
|
||||
# Allow for overriding Family on custom for testing.
|
||||
export FAMILY="${FAMILY:-HYBRID}"
|
||||
export HYBRIDTYPE="${HYBRIDTYPE:-any}"
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
|
||||
@@ -28,5 +28,6 @@ export EXTRA_ARGS
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE=forge
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
|
||||
@@ -25,5 +25,6 @@ fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE=forge
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
|
||||
@@ -34,5 +34,6 @@ fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE=forge
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
|
||||
@@ -48,7 +48,17 @@ if [ ! -f "${SERVER}" ]; then
|
||||
get -o "${SERVER}" "${downloadUrl}"
|
||||
fi
|
||||
|
||||
export FAMILY=HYBRID
|
||||
if [[ "${mohistType}" == "mohist" ]]; then
|
||||
export HYBRIDTYPE=forge
|
||||
elif [[ "${mohistType}" == "youer" ]]; then
|
||||
export HYBRIDTYPE=neoforge
|
||||
elif [[ "${mohistType}" == "banner" ]]; then
|
||||
export HYBRIDTYPE=fabric
|
||||
else
|
||||
log "Unknown server type"
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
|
||||
19
scripts/start-deployNanoLimbo
Executable file
19
scripts/start-deployNanoLimbo
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||
--output-directory=/data \
|
||||
--name-pattern="NanoLimbo-.+?(?<!-sources)\.jar" \
|
||||
Nan1t/NanoLimbo
|
||||
); then
|
||||
logError "Failed to download NanoLimbo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=LIMBO
|
||||
|
||||
exec ${SCRIPTS:-/}start-setupMounts $@
|
||||
37
scripts/start-deployPoseidon
Normal file
37
scripts/start-deployPoseidon
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
isDebugging && set -x
|
||||
|
||||
resolveVersion
|
||||
|
||||
if [ "${VERSION}" != "b1.7.3" ]; then
|
||||
logError "Poseidon server type only supports VERSION=b1.7.3"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# : "${POSEIDON_RELEASE:=latest}" placeholder until I figure out how to add version selection with mc-image-helper
|
||||
: "${POSEIDON_TYPE:=poseidon}"
|
||||
|
||||
if [[ ${POSEIDON_TYPE^^} = UBERBUKKIT ]]; then
|
||||
poseidonRepo="Moresteck/uberbukkit"
|
||||
else
|
||||
poseidonRepo="retromcorg/Project-Poseidon"
|
||||
fi
|
||||
|
||||
if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||
--output-directory=/data \
|
||||
--name-pattern="^(?!original-).+\.jar" \
|
||||
${poseidonRepo}
|
||||
); then
|
||||
logError "Failed to download ${POSEIDON_TYPE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
@@ -151,16 +151,38 @@ if isTrue "${ENABLE_JMX}"; then
|
||||
log "JMX is enabled. Make sure you have port forwarding for ${JMX_PORT}"
|
||||
fi
|
||||
|
||||
if isTrue "${USE_MEOWICE_FLAGS}"; then
|
||||
java_major_version=$(mc-image-helper java-release)
|
||||
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+"
|
||||
else
|
||||
log "Your Java version is $java_major_version, MeowIce's flags are for Java 17+ falling back to Aikar's"
|
||||
USE_MEOWICE_FLAGS=FALSE
|
||||
fi
|
||||
USE_AIKAR_FLAGS=TRUE
|
||||
fi
|
||||
|
||||
if isTrue "${USE_AIKAR_FLAGS}"; then
|
||||
# From https://mcflags.emc.gs/
|
||||
|
||||
if [[ $MAX_MEMORY ]] && (( $(normalizeMemSize "${MAX_MEMORY}") >= $(normalizeMemSize 12g) )); then
|
||||
if isTrue "${USE_MEOWICE_FLAGS}"; then
|
||||
log "Using MeowIce's flags"
|
||||
G1NewSizePercent=28
|
||||
G1MaxNewSizePercent=50
|
||||
G1HeapRegionSize=16M
|
||||
G1ReservePercent=15
|
||||
InitiatingHeapOccupancyPercent=20
|
||||
G1MixedGCCountTarget=3
|
||||
G1RSetUpdatingPauseTimePercent=0
|
||||
elif [[ $MAX_MEMORY ]] && (( $(normalizeMemSize "${MAX_MEMORY}") >= $(normalizeMemSize 12g) )); then
|
||||
log "Using Aikar's >12GB flags"
|
||||
G1NewSizePercent=40
|
||||
G1MaxNewSizePercent=50
|
||||
G1HeapRegionSize=16M
|
||||
G1ReservePercent=15
|
||||
InitiatingHeapOccupancyPercent=20
|
||||
G1MixedGCCountTarget=4
|
||||
G1RSetUpdatingPauseTimePercent=5
|
||||
else
|
||||
log "Using Aikar's flags"
|
||||
G1NewSizePercent=30
|
||||
@@ -168,6 +190,8 @@ if isTrue "${USE_AIKAR_FLAGS}"; then
|
||||
G1HeapRegionSize=8M
|
||||
G1ReservePercent=20
|
||||
InitiatingHeapOccupancyPercent=15
|
||||
G1MixedGCCountTarget=4
|
||||
G1RSetUpdatingPauseTimePercent=5
|
||||
fi
|
||||
|
||||
JVM_XX_OPTS="${JVM_XX_OPTS}
|
||||
@@ -182,10 +206,10 @@ if isTrue "${USE_AIKAR_FLAGS}"; then
|
||||
-XX:G1HeapRegionSize=${G1HeapRegionSize}
|
||||
-XX:G1ReservePercent=${G1ReservePercent}
|
||||
-XX:G1HeapWastePercent=5
|
||||
-XX:G1MixedGCCountTarget=4
|
||||
-XX:G1MixedGCCountTarget=${G1MixedGCCountTarget}
|
||||
-XX:InitiatingHeapOccupancyPercent=${InitiatingHeapOccupancyPercent}
|
||||
-XX:G1MixedGCLiveThresholdPercent=90
|
||||
-XX:G1RSetUpdatingPauseTimePercent=5
|
||||
-XX:G1RSetUpdatingPauseTimePercent=${G1RSetUpdatingPauseTimePercent}
|
||||
-XX:SurvivorRatio=32
|
||||
-XX:+PerfDisableSharedMem
|
||||
-XX:MaxTenuringThreshold=1
|
||||
@@ -194,6 +218,110 @@ if isTrue "${USE_AIKAR_FLAGS}"; then
|
||||
"
|
||||
fi
|
||||
|
||||
if isTrue "${USE_MEOWICE_FLAGS}"; then
|
||||
JVM_XX_OPTS="${JVM_XX_OPTS}
|
||||
-XX:+UnlockDiagnosticVMOptions
|
||||
-XX:G1SATBBufferEnqueueingThresholdPercent=30
|
||||
-XX:G1ConcMarkStepDurationMillis=5
|
||||
-XX:+UseNUMA
|
||||
-XX:-DontCompileHugeMethods
|
||||
-XX:MaxNodeLimit=240000
|
||||
-XX:NodeLimitFudgeFactor=8000
|
||||
-XX:ReservedCodeCacheSize=400M
|
||||
-XX:NonNMethodCodeHeapSize=12M
|
||||
-XX:ProfiledCodeHeapSize=194M
|
||||
-XX:NonProfiledCodeHeapSize=194M
|
||||
-XX:NmethodSweepActivity=1
|
||||
-XX:+UseFastUnorderedTimeStamps
|
||||
-XX:+UseCriticalJavaThreadPriority
|
||||
-XX:AllocatePrefetchStyle=3
|
||||
-XX:+AlwaysActAsServerClassMachine
|
||||
-XX:+UseTransparentHugePages
|
||||
-XX:LargePageSizeInBytes=2M
|
||||
-XX:+UseLargePages
|
||||
-XX:+EagerJVMCI
|
||||
-XX:+UseStringDeduplication
|
||||
-XX:+UseAES
|
||||
-XX:+UseAESIntrinsics
|
||||
-XX:+UseFMA
|
||||
-XX:+UseLoopPredicate
|
||||
-XX:+RangeCheckElimination
|
||||
-XX:+OptimizeStringConcat
|
||||
-XX:+UseCompressedOops
|
||||
-XX:+UseThreadPriorities
|
||||
-XX:+OmitStackTraceInFastThrow
|
||||
-XX:+RewriteBytecodes
|
||||
-XX:+RewriteFrequentPairs
|
||||
-XX:+UseFPUForSpilling
|
||||
-XX:+UseFastStosb
|
||||
-XX:+UseNewLongLShift
|
||||
-XX:+UseVectorCmov
|
||||
-XX:+UseXMMForArrayCopy
|
||||
-XX:+UseXmmI2D
|
||||
-XX:+UseXmmI2F
|
||||
-XX:+UseXmmLoadAndClearUpper
|
||||
-XX:+UseXmmRegToRegMoveAll
|
||||
-XX:+EliminateLocks
|
||||
-XX:+DoEscapeAnalysis
|
||||
-XX:+AlignVector
|
||||
-XX:+OptimizeFill
|
||||
-XX:+EnableVectorSupport
|
||||
-XX:+UseCharacterCompareIntrinsics
|
||||
-XX:+UseCopySignIntrinsic
|
||||
-XX:+UseVectorStubs
|
||||
-XX:UseAVX=2
|
||||
-XX:UseSSE=4
|
||||
"
|
||||
fi
|
||||
|
||||
if isTrue "${USE_MEOWICE_GRAALVM_FLAGS}"; then
|
||||
if [[ $java_major_version -lt 25 ]]; then
|
||||
log "Java 24 or higher detected, using modified GraalVM flags"
|
||||
JVM_XX_OPTS="${JVM_XX_OPTS}
|
||||
-XX:+UseFastJNIAccessors
|
||||
-XX:+UseInlineCaches
|
||||
-XX:+SegmentedCodeCache
|
||||
-Djdk.nio.maxCachedBufferSize=262144
|
||||
-Djdk.graal.UsePriorityInlining=true
|
||||
-Djdk.graal.Vectorization=true
|
||||
-Djdk.graal.OptDuplication=true
|
||||
-Djdk.graal.DetectInvertedLoopsAsCounted=true
|
||||
-Djdk.graal.LoopInversion=true
|
||||
-Djdk.graal.VectorizeHashes=true
|
||||
-Djdk.graal.EnterprisePartialUnroll=true
|
||||
-Djdk.graal.VectorizeSIMD=true
|
||||
-Djdk.graal.StripMineNonCountedLoops=true
|
||||
-Djdk.graal.SpeculativeGuardMovement=true
|
||||
-Djdk.graal.TuneInlinerExploration=1
|
||||
-Djdk.graal.LoopRotation=true
|
||||
-Djdk.graal.CompilerConfiguration=enterprise
|
||||
--enable-native-access=ALL-UNNAMED
|
||||
"
|
||||
else
|
||||
log "Using MeowIce's flags for Graalvm"
|
||||
JVM_XX_OPTS="${JVM_XX_OPTS}
|
||||
-XX:+UseFastJNIAccessors
|
||||
-XX:+UseInlineCaches
|
||||
-XX:+SegmentedCodeCache
|
||||
-Djdk.nio.maxCachedBufferSize=262144
|
||||
-Dgraal.UsePriorityInlining=true
|
||||
-Dgraal.Vectorization=true
|
||||
-Dgraal.OptDuplication=true
|
||||
-Dgraal.DetectInvertedLoopsAsCounted=true
|
||||
-Dgraal.LoopInversion=true
|
||||
-Dgraal.VectorizeHashes=true
|
||||
-Dgraal.EnterprisePartialUnroll=true
|
||||
-Dgraal.VectorizeSIMD=true
|
||||
-Dgraal.StripMineNonCountedLoops=true
|
||||
-Dgraal.SpeculativeGuardMovement=true
|
||||
-Dgraal.TuneInlinerExploration=1
|
||||
-Dgraal.LoopRotation=true
|
||||
-Dgraal.OptWriteMotion=true
|
||||
-Dgraal.CompilerConfiguration=enterprise
|
||||
"
|
||||
fi
|
||||
fi
|
||||
|
||||
if isTrue "${USE_FLARE_FLAGS}"; then
|
||||
JVM_XX_OPTS="${JVM_XX_OPTS}
|
||||
-XX:+UnlockDiagnosticVMOptions
|
||||
@@ -360,4 +488,3 @@ else
|
||||
exec mc-server-runner ${bootstrapArgs} "${mcServerRunnerArgs[@]}" java "${finalArgs[@]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ function handleModrinthProjects() {
|
||||
|
||||
if [[ $MODRINTH_PROJECTS ]]; then
|
||||
if isFamily HYBRID; then
|
||||
loader=forge
|
||||
loader=${HYBRIDTYPE}
|
||||
elif isFamily VANILLA; then
|
||||
loader=datapack
|
||||
else
|
||||
@@ -297,7 +297,7 @@ function handleCurseForgeFiles() {
|
||||
if isFamily HYBRID; then
|
||||
# To disambiguate mc-mods we'll assume that hybrid servers
|
||||
# are blending Forge (rather than Fabric or NeoForge)
|
||||
args+=(--mod-loader "forge")
|
||||
args+=(--mod-loader "${HYBRIDTYPE}")
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user