From cc8a375be19321937e0b7f7cc5afbfa8f14ab798 Mon Sep 17 00:00:00 2001 From: Joshua Taylor Date: Thu, 16 Nov 2023 10:48:09 -0600 Subject: [PATCH] Correct fabric template, update forge to ensure it uses docker correctly --- minecraft/minecraft.json | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/minecraft/minecraft.json b/minecraft/minecraft.json index 98322de0..64e8f743 100644 --- a/minecraft/minecraft.json +++ b/minecraft/minecraft.json @@ -217,12 +217,6 @@ "java${javaversion} -jar fabric-installer.jar server -mcversion ${version} -downloadMinecraft -noprofile" ] }, - { - "if": "modlauncher == 'fabric'", - "type": "move", - "source": "fabric-server-launch.jar", - "target": "server.jar" - }, { "if": "modlauncher == 'forge'", "type": "forgedl", @@ -333,12 +327,28 @@ "command": [ { "command": "java${javaversion} -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true @libraries/net/minecraftforge/forge/${version}/win_args.txt nogui", - "if": "modlauncher == 'forge' \u0026\u0026 os == 'windows' \u0026\u0026 file_exists('libraries/net/minecraftforge/forge/' + version + '/win_args.txt')" + "if": "env == 'host' && modlauncher == 'forge' && os == 'windows' && file_exists('libraries/net/minecraftforge/forge/' + version + '/win_args.txt')" }, { "command": "java${javaversion} -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true @libraries/net/minecraftforge/forge/${version}/unix_args.txt nogui", - "if": "modlauncher == 'forge' \u0026\u0026 file_exists('libraries/net/minecraftforge/forge/' + version+ '/unix_args.txt')" + "if": "env == 'host' && modlauncher == 'forge' && file_exists('libraries/net/minecraftforge/forge/' + version+ '/unix_args.txt')" + }, + { + "command": "java -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true @libraries/net/minecraftforge/forge/${version}/win_args.txt nogui", + "if": "env != 'host' && modlauncher == 'forge' && os == 'windows' && file_exists('libraries/net/minecraftforge/forge/' + version + '/win_args.txt')" + }, + { + "command": "java -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true @libraries/net/minecraftforge/forge/${version}/unix_args.txt nogui", + "if": "env != 'host' && modlauncher == 'forge' && file_exists('libraries/net/minecraftforge/forge/' + version+ '/unix_args.txt')" }, + { + "command": "java${javaversion} -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true -jar fabric-server-launch.jar", + "if": "env == 'host' && modlauncher == 'fabric'" + }, + { + "command": "java -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true -jar server.jar", + "if": "env != 'host' && modlauncher == 'fabric'" + }, { "command": "java${javaversion} -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true -jar server.jar", "if": "env == 'host'"