From 582aedfd2e4d10d2afc603c366db3699c3925f64 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 31 Mar 2024 16:50:22 +0300 Subject: [PATCH] added userdata dir by default --- vanilla/linux.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/vanilla/linux.sh b/vanilla/linux.sh index 1fad0c8..f9306ce 100755 --- a/vanilla/linux.sh +++ b/vanilla/linux.sh @@ -15,13 +15,10 @@ fi # A minecraft root directory MC_DIR=$HOME/.minecraft -# Get archive from natives/ dir -NATIVES_DIR=$MC_DIR/bin/1.20.2 - # Are stored here... # saves/, resourcepacks/ and screenshots/ dirs # and options.txt and servers.dat files -GAME_DIR=$MC_DIR +GAME_DIR=$MC_DIR/userdata # Libraries and resource dir (requires no changes) ASSETS_DIR=$MC_DIR/assets @@ -30,6 +27,9 @@ ASSETS_INDEX=5 # Version minecraft (from versions/ dir) GAME_VERSION=1.20.4 +# Get archive from natives/ dir +NATIVES_DIR=$MC_DIR/bin/$GAME_VERSION + # *.jar paths from version.json LIBRARIES_LIST="\ $MC_DIR/libraries/com/github/oshi/oshi-core/6.4.5/oshi-core-6.4.5.jar:\ @@ -109,9 +109,13 @@ WINDOW_H=640 JVM_RAM="-Xmx2G" JVM_ARGS="-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M" -# Running minecraft +# Change directory cd $MC_DIR +# Prepare game directory +mkdir -p $MC_DIR/userdata + +# Running minecraft $MC_DIR/runtime/java-runtime-gamma/linux/java-runtime-gamma/bin/java \ $JVM_RAM $JVM_ARGS \ -cp $LIBRARIES_LIST \