diff --git a/minecraft-curseforge/data.json b/minecraft-curseforge-forge/data.json similarity index 83% rename from minecraft-curseforge/data.json rename to minecraft-curseforge-forge/data.json index 91731c9c..49104beb 100644 --- a/minecraft-curseforge/data.json +++ b/minecraft-curseforge-forge/data.json @@ -1,6 +1,6 @@ [ { - "name": "minecraft-curseforge-715572", + "name": "minecraft-curseforge-forge-715572", "variables": { "memory": "4096", "ip": "0.0.0.0", @@ -15,7 +15,7 @@ } }, { - "name": "minecraft-curseforge-389615", + "name": "minecraft-curseforge-forge-389615", "variables": { "memory": "4096", "ip": "0.0.0.0", @@ -30,7 +30,7 @@ } }, { - "name": "minecraft-curseforge-285109", + "name": "minecraft-curseforge-forge-285109", "variables": { "memory": "4096", "ip": "0.0.0.0", @@ -45,7 +45,7 @@ } }, { - "name": "minecraft-curseforge-876781", + "name": "minecraft-curseforge-forge-876781", "variables": { "memory": "4096", "ip": "0.0.0.0", @@ -60,7 +60,7 @@ } }, { - "name": "minecraft-curseforge-829758", + "name": "minecraft-curseforge-forge-829758", "variables": { "memory": "4096", "ip": "0.0.0.0", @@ -75,7 +75,7 @@ } }, { - "name": "minecraft-curseforge-520914", + "name": "minecraft-curseforge-forge-520914", "variables": { "memory": "4096", "ip": "0.0.0.0", @@ -90,7 +90,7 @@ } }, { - "name": "minecraft-curseforge-466901", + "name": "minecraft-curseforge-forge-466901", "variables": { "memory": "4096", "ip": "0.0.0.0", @@ -105,7 +105,7 @@ } }, { - "name": "minecraft-curseforge-887839", + "name": "minecraft-curseforge-forge-887839", "variables": { "memory": "4096", "ip": "0.0.0.0", diff --git a/minecraft-curseforge/minecraft-curseforge.json b/minecraft-curseforge-forge/minecraft-curseforge-forge.json similarity index 98% rename from minecraft-curseforge/minecraft-curseforge.json rename to minecraft-curseforge-forge/minecraft-curseforge-forge.json index 51c7e5cb..a2752ca3 100644 --- a/minecraft-curseforge/minecraft-curseforge.json +++ b/minecraft-curseforge-forge/minecraft-curseforge-forge.json @@ -54,7 +54,7 @@ "projectId": { "type": "integer", "value": 0, - "display": "Project Id", + "display": "Project ID", "desc": "Project Id for the modpack desired. This is found on the modpack's webpage on the right side.", "required": true, "userEdit": false @@ -62,7 +62,7 @@ "fileId": { "type": "integer", "value": 0, - "display": "File Id", + "display": "File ID", "desc": "File Id for the modpack desired. This is found at the end of the URL for the specific file desired.", "required": true, "userEdit": false diff --git a/minecraft-curseforge-neoforge/data.json b/minecraft-curseforge-neoforge/data.json new file mode 100644 index 00000000..dd2e259c --- /dev/null +++ b/minecraft-curseforge-neoforge/data.json @@ -0,0 +1,122 @@ +[ + { + "name": "minecraft-curseforge-neoforge-379757", + "variables": { + "memory": "4096", + "ip": "0.0.0.0", + "port": "25565", + "eula": true, + "javaversion": "21", + "projectId": "379757", + "fileId": "0" + }, + "environment": { + "type": "host" + } + }, + { + "name": "minecraft-curseforge-neoforge-574291", + "variables": { + "memory": "4096", + "ip": "0.0.0.0", + "port": "25565", + "eula": true, + "javaversion": "17", + "projectId": "574291", + "fileId": "0" + }, + "environment": { + "type": "host" + } + }, + { + "name": "minecraft-curseforge-neoforge-493082", + "variables": { + "memory": "4096", + "ip": "0.0.0.0", + "port": "25565", + "eula": true, + "javaversion": "17", + "projectId": "493082", + "fileId": "0" + }, + "environment": { + "type": "host" + } + }, + { + "name": "minecraft-curseforge-neoforge-447596", + "variables": { + "memory": "4096", + "ip": "0.0.0.0", + "port": "25565", + "eula": true, + "javaversion": "21", + "projectId": "447596", + "fileId": "0" + }, + "environment": { + "type": "host" + } + }, + { + "name": "minecraft-curseforge-neoforge-491512", + "variables": { + "memory": "4096", + "ip": "0.0.0.0", + "port": "25565", + "eula": true, + "javaversion": "21", + "projectId": "491512", + "fileId": "0" + }, + "environment": { + "type": "host" + } + }, + { + "name": "minecraft-curseforge-neoforge-572641", + "variables": { + "memory": "4096", + "ip": "0.0.0.0", + "port": "25565", + "eula": true, + "javaversion": "21", + "projectId": "572641", + "fileId": "0" + }, + "environment": { + "type": "host" + } + }, + { + "name": "minecraft-curseforge-neoforge-309625", + "variables": { + "memory": "4096", + "ip": "0.0.0.0", + "port": "25565", + "eula": true, + "javaversion": "17", + "projectId": "309625", + "fileId": "5181988" + }, + "environment": { + "type": "host" + } + }, + { + "name": "minecraft-curseforge-neoforge-854426", + "variables": { + "memory": "4096", + "ip": "0.0.0.0", + "port": "25565", + "eula": true, + "javaversion": "17", + "projectId": "854426", + "fileId": "0" + }, + "environment": { + "type": "host" + } + } +] \ No newline at end of file diff --git a/minecraft-curseforge-neoforge/minecraft-curseforge-neoforge.json b/minecraft-curseforge-neoforge/minecraft-curseforge-neoforge.json new file mode 100644 index 00000000..19cc8696 --- /dev/null +++ b/minecraft-curseforge-neoforge/minecraft-curseforge-neoforge.json @@ -0,0 +1,156 @@ +{ + "type": "minecraft-java", + "display": "Minecraft: Java Edition (Curseforge Modpack)", + "icon": "minecraft-java", + "data": { + "eula": { + "type": "boolean", + "value": false, + "display": "EULA Agreement (true/false)", + "desc": "Do you (or the server owner) agree to the Minecraft EULA?", + "required": true, + "userEdit": true + }, + "ip": { + "type": "string", + "value": "0.0.0.0", + "display": "IP", + "desc": "What IP to bind the server to", + "required": true, + "userEdit": false + }, + "javaversion": { + "type": "string", + "value": "17", + "display": "Java Version", + "desc": "Version of Java to use", + "required": true, + "userEdit": true + }, + "jvmArgs": { + "type": "string", + "value": "-Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true", + "display": "JVM Arguments", + "desc": "Extra JVM arguments to pass", + "required": false, + "userEdit": false + }, + "memory": { + "type": "integer", + "value": 1024, + "display": "Memory (MB)", + "desc": "How much memory in MB to allocate to the Java Heap", + "required": true, + "userEdit": false + }, + "port": { + "type": "integer", + "value": 25565, + "display": "Port", + "desc": "What port to bind the server to", + "required": true, + "userEdit": false + }, + "projectId": { + "type": "integer", + "value": 0, + "display": "Project ID", + "desc": "Project ID for the modpack desired. This is found on the modpack's webpage on the right side.", + "required": true, + "userEdit": false + }, + "fileId": { + "type": "integer", + "value": 0, + "display": "File ID", + "desc": "File ID for the modpack desired. This is found at the end of the URL for the specific file desired.", + "required": true, + "userEdit": false + } + }, + "install": [ + { + "if": "javaversion != ''", + "type": "javadl", + "version": "${javaversion}" + }, + { + "if": "env == 'host'", + "type": "curseforge", + "projectId": "${projectId}", + "fileId": "${fileId}", + "java": "java${javaversion}" + }, + { + "if": "env != 'host'", + "type": "curseforge", + "projectId": "${projectId}", + "fileId": "${fileId}" + }, + { + "if": "!file_exists(\"server.properties\")", + "type": "writefile", + "text": "server-ip=${ip}\nserver-port=${port}\n", + "target": "server.properties" + }, + { + "type": "writefile", + "text": "eula=${eula}", + "target": "eula.txt" + } + ], + "run": { + "command": [ + { + "command": "java${javaversion} -Xmx${memory}M ${jvmArgs} @libraries/net/neoforged/neoforge/${resolvedNeoForgeVersion}/win_args.txt nogui", + "if": "env == 'host' && os == 'windows' && !file_exists('server.jar')" + }, + { + "command": "java${javaversion} -Xmx${memory}M ${jvmArgs} @libraries/net/neoforged/neoforge/${resolvedNeoForgeVersion}/unix_args.txt nogui", + "if": "env == 'host' && !file_exists('server.jar')" + }, + { + "command": "java -Xmx${memory}M ${jvmArgs} @libraries/net/neoforged/neoforge/${resolvedNeoForgeVersion}/win_args.txt nogui", + "if": "env != 'host' && os == 'windows' && !file_exists('server.jar')" + }, + { + "command": "java -Xmx${memory}M ${jvmArgs} @libraries/net/neoforged/neoforge/${resolvedNeoForgeVersion}/unix_args.txt nogui", + "if": "env == 'host' && !file_exists('server.jar')" + }, + { + "command": "java${javaversion} -Xmx${memory}M ${jvmArgs} -jar server.jar nogui", + "if": "env == 'host'" + }, + { + "command": "java -Xmx${memory}M ${jvmArgs} -jar server.jar nogui" + } + ], + "pre": [ + { + "if": "!file_exists('server.jar')", + "type": "resolveneoforgeversion", + "outputVariable": "resolvedNeoForgeVersion" + } + ], + "stop": "stop", + "stdin": { + "type": "stdin" + }, + "autostart": false, + "autorecover": false, + "autorestart": false + }, + "environment": { + "type": "host" + }, + "supportedEnvironments": [ + { + "type": "host" + }, + { + "type": "docker", + "image": "eclipse-temurin:${javaversion}" + } + ], + "requirements": {} +} diff --git a/minecraft/data.json b/minecraft/data.json index 8e0ffe86..4e40cead 100644 --- a/minecraft/data.json +++ b/minecraft/data.json @@ -47,6 +47,22 @@ "type": "host" } }, + { + "name": "minecraft-neoforge", + "variables": { + "memory": "2048", + "ip": "0.0.0.0", + "port": "25565", + "eula": true, + "version": "1.20.1", + "motd": "None", + "javaversion": "17", + "modlauncher": "forge" + }, + "environment": { + "type": "host" + } + }, { "name": "minecraft-paper", "variables": { diff --git a/minecraft/minecraft.json b/minecraft/minecraft.json index 7d31ccec..ce0c90bd 100644 --- a/minecraft/minecraft.json +++ b/minecraft/minecraft.json @@ -19,6 +19,14 @@ "required": false, "userEdit": true }, + "neoforgebuild": { + "type": "string", + "value": "", + "display": "NeoForge Version", + "desc": "Version of NeoForge to install (may be located here", + "required": false, + "userEdit": true + }, "ip": { "type": "string", "value": "0.0.0.0", @@ -29,7 +37,7 @@ }, "javaversion": { "type": "string", - "value": "17", + "value": "21", "display": "Java Version", "desc": "Version of Java to use", "required": true, @@ -63,14 +71,18 @@ "value": "", "display": "None/Vanilla" }, - { - "value": "fabric", - "display": "Fabric" - }, { "value": "forge", "display": "MinecraftForge" }, + { + "value": "neoforge", + "display": "NeoForge" + }, + { + "value": "fabric", + "display": "Fabric" + }, { "value": "paper", "display": "Paper" @@ -121,6 +133,15 @@ "required": true, "userEdit": true, "internal": true + }, + "resolvedNeoForgeVersion": { + "type": "string", + "value": "", + "display": "Resolved NeoForge Version", + "desc": "Internal, resolved version of NeoForge", + "required": true, + "userEdit": true, + "internal": true } }, "groups": [ @@ -149,6 +170,15 @@ ], "order": 2 }, + { + "if": "modlauncher == 'neoforge'", + "display": "NeoForge", + "description": "Settings if using NeoForge", + "variables": [ + "neoforgebuild" + ], + "order": 3 + }, { "if": "modlauncher == 'paper'", "display": "Paper", @@ -156,7 +186,7 @@ "variables": [ "paperbuild" ], - "order": 3 + "order": 4 } ], "install": [ @@ -223,6 +253,34 @@ "source": "forge-${forgebuild}.jar", "target": "server.jar" }, + { + "if": "modlauncher == 'neoforge'", + "type": "neoforgedl", + "target": "installer.jar", + "version": "${neoforgebuild}", + "minecraftVersion": "${version}", + "outputVariable": "resolvedNeoForgeVersion" + }, + { + "if": "modlauncher == 'neoforge' && env == 'host'", + "type": "command", + "commands": [ + "java${javaversion} -jar installer.jar --installServer" + ] + }, + { + "if": "modlauncher == 'neoforge' && env != 'host'", + "type": "command", + "commands": [ + "java -jar installer.jar --installServer" + ] + }, + { + "if": "modlauncher == 'neoforge' && file_exists('neoforge-' + neoforgebuild + '.jar')", + "type": "move", + "source": "neoforge-${neoforgebuild}.jar", + "target": "server.jar" + }, { "if": "modlauncher == 'paper'", "type": "download", @@ -293,6 +351,22 @@ "command": "java -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true ${jvmArgs} @libraries/net/minecraftforge/forge/${resolvedForgeVersion}/unix_args.txt nogui", "if": "env != 'host' && modlauncher == 'forge' && file_exists('libraries/net/minecraftforge/forge/' + resolvedForgeVersion+ '/unix_args.txt')" }, + { + "command": "java${javaversion} -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true ${jvmArgs} @libraries/net/neoforged/neoforge/${resolvedNeoForgeVersion}/win_args.txt nogui", + "if": "env == 'host' && modlauncher == 'neoforge' && os == 'windows' && file_exists('libraries/net/neoforged/neoforge/' + resolvedNeoForgeVersion + '/win_args.txt')" + }, + { + "command": "java${javaversion} -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true ${jvmArgs} @libraries/net/neoforged/neoforge/${resolvedNeoForgeVersion}/unix_args.txt nogui", + "if": "env == 'host' && modlauncher == 'neoforge' && file_exists('libraries/net/neoforged/neoforge/' + resolvedNeoForgeVersion + '/unix_args.txt')" + }, + { + "command": "java -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true ${jvmArgs} @libraries/net/neoforged/neoforge/${resolvedNeoForgeVersion}/win_args.txt nogui", + "if": "env != 'host' && modlauncher == 'neoforge' && os == 'windows' && file_exists('libraries/net/neoforged/nepforge/' + resolvedNeoForgeVersion + '/win_args.txt')" + }, + { + "command": "java -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true ${jvmArgs} @libraries/net/neoforged/neoforge/${resolvedNeoForgeVersion}/unix_args.txt nogui", + "if": "env != 'host' && modlauncher == 'neoforge' && file_exists('libraries/net/neoforged/neoforge/' + resolvedNeoForgeVersion+ '/unix_args.txt')" + }, { "command": "java${javaversion} -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true ${jvmArgs} -jar fabric-server-launch.jar", "if": "env == 'host' && modlauncher == 'fabric'" @@ -316,6 +390,13 @@ "minecraftVersion": "${version}", "version": "${forgebuild}", "outputVariable": "resolvedForgeVersion" + }, + { + "if": "modlauncher == 'neoforge'", + "type": "resolveneoforgeversion", + "minecraftVersion": "${version}", + "version": "${neoforgebuild}", + "outputVariable": "resolvedNeoForgeVersion" } ], "stop": "stop",