binhex / arch-minecraftserver

Docker build script for Arch Linux base with Minecraft Java server
GNU General Public License v3.0
18 stars 27 forks source link

Issue with Forge for 1.18.2 #15

Open Kuponutmog opened 1 year ago

Kuponutmog commented 1 year ago

I have used forge without issues previous to 1.18.2. Since this version forge has changed the way they package their software so that it is no longer a single .jar

I have got it working by manually editing the docker and replacing the following line in start.sh:

screen -L -Logfile '/config/minecraft/logs/screen.log' -d -S minecraft -m bash -c "cd /config/minecraft && java -Xms${JAVA_INITIAL_HEAP_SIZE} -Xmx${JAVA_MAX_HEAP_SIZE} -XX:ParallelGCThreads=${JAVA_MAX_THREADS} ${java_log4j_mitigation} -jar ${CUSTOM_JAR_PATH} nogui"

With: screen -L -Logfile '/config/minecraft/logs/screen.log' -d -S minecraft -m bash -c "cd /config/minecraft && /usr/lib/jvm/java-17-openjdk/bin/java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.18.2-40.2.1/unix_args.txt "$@""

Note that originally it was using java 19 by default and that was causing it to crash, i had manually installed 17 and that is now working with the above.

1) Can you make it so that java 17 is selectable along side 8 , 11 and latest? 2) Is is possible to adjust the start command to be able to take the below line or a variation of command? @user_jvm_args.txt is probably not needed as its a file where you would put all the Xms/Xmx etc args.

@user_jvm_args.txt @libraries/net/minecraftforge/forge/1.18.2-40.2.1/unix_args.txt "$@"