Skip to content

Commit

Permalink
PreRelease v4.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Chikage0o0 committed Jan 9, 2023
1 parent 4d1561e commit 32f7a6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 71 deletions.
37 changes: 3 additions & 34 deletions server-overrides/start.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,11 @@ SET JAVA="java"
SET MINECRAFT="1.19.2"
SET FABRIC="0.14.11"
SET INSTALLER="0.11.1"
SET ARGS="-Xmx5G"
SET OTHERARGS="-Dlog4j2.formatMsgNoLookups=true"
SET ARGS="-Xmx4G"
SET OTHERARGS="-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -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:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1"

SET AGREE="I agree"

IF NOT EXIST fabric-server-launch.jar (

ECHO Fabric Server JAR-file not found. Downloading installer...
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://maven.fabricmc.net/net/fabricmc/fabric-installer/%INSTALLER%/fabric-installer-%INSTALLER%.jar', 'fabric-installer.jar')"

IF EXIST fabric-installer.jar (

ECHO Installer downloaded. Installing...
java -jar fabric-installer.jar server -mcversion %MINECRAFT% -loader %FABRIC% -downloadMinecraft

IF EXIST fabric-server-launch.jar (
RMDIR /S /Q .fabric-installer
DEL fabric-installer.jar
ECHO Installation complete. fabric-installer.jar and installation files deleted.
)

) ELSE (
ECHO fabric-installer.jar not found. Maybe the Fabric servers are having trouble.
ECHO Please try again in a couple of minutes.
)
) ELSE (
ECHO fabric-server-launch.jar present. Moving on...
)

IF NOT EXIST server.jar (
ECHO Minecraft Server JAR-file not found. Downloading...
powershell -Command "(New-Object Net.WebClient).DownloadFile('Optional[https://launcher.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar]', 'server.jar')"
) ELSE (
ECHO server.jar present. Moving on...
)

IF NOT EXIST eula.txt (
ECHO Mojang's EULA has not yet been accepted. In order to run a Minecraft server, you must accept Mojang's EULA.
ECHO Mojang's EULA is available to read at https://account.mojang.com/documents/minecraft_eula
Expand All @@ -66,6 +35,6 @@ ECHO Java version:
%JAVA% --version
ECHO Java args: %ARGS%

%JAVA% "%OTHERARGS%" %ARGS% -jar fabric-server-launch.jar nogui
%JAVA% "%OTHERARGS%" %ARGS% -jar fabric-server-mc.%MINECRAFT%-loader.%FABRIC%-launcher.%INSTALLER%.jar nogui

PAUSE
40 changes: 3 additions & 37 deletions server-overrides/start.sh
Original file line number Diff line number Diff line change
@@ -1,45 +1,11 @@
#!/usr/bin/env bash
# Start script generated by ServerPackCreator.
# This script checks for the Minecraft and Forge JAR-Files, and if they are not found, they are downloaded and installed.
# If everything is in order, the server is started.

JAVA="java"
MINECRAFT="1.19.2"
FABRIC="0.14.11"
INSTALLER="0.11.1"
ARGS=""
OTHERARGS="-Dlog4j2.formatMsgNoLookups=true"

if [[ ! -s "fabric-server-launch.jar" ]];then

echo "Fabric Server JAR-file not found. Downloading installer...";
wget -O fabric-installer.jar https://maven.fabricmc.net/net/fabricmc/fabric-installer/$INSTALLER/fabric-installer-$INSTALLER.jar;

if [[ -s "fabric-installer.jar" ]];then

echo "Installer downloaded. Installing...";
java -jar fabric-installer.jar server -mcversion $MINECRAFT -loader $FABRIC -downloadMinecraft;

if [[ -s "fabric-server-launch.jar" ]];then
rm -rf .fabric-installer;
rm -f fabric-installer.jar;
echo "Installation complete. fabric-installer.jar deleted.";
fi

else
echo "fabric-installer.jar not found. Maybe the Fabric server are having trouble.";
echo "Please try again in a couple of minutes.";
fi
else
echo "fabric-server-launch.jar present. Moving on...";
fi

if [[ ! -s "server.jar" ]];then
echo "Minecraft Server JAR-file not found. Downloading...";
wget -O server.jar Optional[https://launcher.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar];
else
echo "server.jar present. Moving on...";
fi
ARGS="-Xmx4G"
OTHERARGS="-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -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:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1"

if [[ ! -s "eula.txt" ]];then
echo "Mojang's EULA has not yet been accepted. In order to run a Minecraft server, you must accept Mojang's EULA."
Expand All @@ -64,4 +30,4 @@ echo "Java version:"
$JAVA -version
echo "Java args: $ARGS";

$JAVA $OTHERARGS $ARGS -jar fabric-server-launch.jar nogui
$JAVA $OTHERARGS $ARGS -jar fabric-server-mc.${MINECRAFT}-loader.${FABRIC}-launcher.${INSTALLER}.jar nogui

0 comments on commit 32f7a6a

Please sign in to comment.