From ea09eea3675ce90b44f11b91d6b0ec84a905e4ec Mon Sep 17 00:00:00 2001
From: Yusuf Nayab <86286368+spusuf@users.noreply.github.com>
Date: Thu, 1 Aug 2024 16:51:01 +1000
Subject: [PATCH 1/2] Create minecraft-neoforged.json
---
minecraft-neoforged/minecraft-neoforged.json | 106 +++++++++++++++++++
1 file changed, 106 insertions(+)
create mode 100644 minecraft-neoforged/minecraft-neoforged.json
diff --git a/minecraft-neoforged/minecraft-neoforged.json b/minecraft-neoforged/minecraft-neoforged.json
new file mode 100644
index 0000000..29363ae
--- /dev/null
+++ b/minecraft-neoforged/minecraft-neoforged.json
@@ -0,0 +1,106 @@
+{
+ "name": "minecraft-neoforged",
+ "display": "Minecraft NeoForge",
+ "type": "minecraft-java",
+ "install": [
+ {
+ "type": "javadl",
+ "version": "${javaversion}"
+ },
+ {
+ "files": [
+ "https://maven.neoforged.net/releases/net/neoforged/neoforge/${version}/neoforge-${version}-installer.jar"
+ ],
+ "type": "download"
+ },
+ {
+ "source": "neoforge-*.jar",
+ "target": "neoforge.jar",
+ "type": "move"
+ },
+ {
+ "commands": [
+ "java${javaversion} -jar neoforge.jar --installServer"
+ ],
+ "type": "command"
+ },
+ {
+ "target": "server.properties",
+ "text": "server-ip=${ip}\nserver-port=${port}\nmotd=${motd}\n",
+ "type": "writefile"
+ },
+ {
+ "target": "eula.txt",
+ "text": "eula=${eula}",
+ "type": "writefile"
+ }
+ ],
+ "run": {
+ "stop": "stop",
+ "command": "java${javaversion} -Xmx${memory}M -Dterminal.jline=false -Dterminal.ansi=true -Dlog4j2.formatMsgNoLookups=true @libraries/net/neoforged/neoforge/${version}/unix_args.txt nogui",
+ "workingDirectory": "",
+ "pre": [],
+ "post": [],
+ "environmentVars": {}
+ },
+ "data": {
+ "eula": {
+ "type": "boolean",
+ "desc": "Do you (or the server owner) agree to the Minecraft EULA?",
+ "display": "EULA Agreement (true/false)",
+ "required": true,
+ "value": "false"
+ },
+ "ip": {
+ "type": "string",
+ "desc": "What IP to bind the server to",
+ "display": "IP",
+ "required": true,
+ "value": "0.0.0.0"
+ },
+ "javaversion": {
+ "type": "string",
+ "desc": "Version of Java to use",
+ "display": "Java Version",
+ "required": true,
+ "value": "17"
+ },
+ "memory": {
+ "type": "integer",
+ "desc": "How much memory in MB to allocate to the Java Heap",
+ "display": "Memory (MB)",
+ "required": true,
+ "value": "1024"
+ },
+ "motd": {
+ "type": "string",
+ "desc": "This is the message that is displayed in the server list of the client, below the name. The MOTD does support color and formatting codes.",
+ "display": "MOTD message of the day",
+ "required": true,
+ "value": "A Neoforged Minecraft Server\\n\\u00A79 hosted on PufferPanel"
+ },
+ "port": {
+ "type": "integer",
+ "desc": "What port to bind the server to",
+ "display": "Port",
+ "required": true,
+ "value": "25565"
+ },
+ "version": {
+ "type": "string",
+ "desc": "Version of NeoForged to install You can find the latest neoforged package for your desired minecraft version from here",
+ "display": "Neo Version",
+ "required": true,
+ "value": "20.4.237"
+ }
+ },
+ "environment": {
+ "type": "standard"
+ },
+ "supportedEnvironments": [
+ {
+ "type": "standard"
+ }
+ ],
+ "requirements": {}
+}
From 42a17316b7bbdcfdfade096450707dd5cf3937ea Mon Sep 17 00:00:00 2001
From: Yusuf Nayab <86286368+spusuf@users.noreply.github.com>
Date: Thu, 1 Aug 2024 17:07:18 +1000
Subject: [PATCH 2/2] Create README.md
---
minecraft-neoforged/README.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 minecraft-neoforged/README.md
diff --git a/minecraft-neoforged/README.md b/minecraft-neoforged/README.md
new file mode 100644
index 0000000..8dbddfd
--- /dev/null
+++ b/minecraft-neoforged/README.md
@@ -0,0 +1,15 @@
+# Template for a Minecraft Server with [NeoForged](https://neoforged.net/) installed
+Template written by [Spusuf](https://github.com/spusuf
+Compatible with 1.20.2 to latest (1.21.0)
+Tested on Linux baremetal and using pufferpanel installed in docker, but nothing should prevent running on other platforms.
+Versions older than are available on the current archive (older than 1.20.2) are hosted in a seperate location and are not compatible unless you manually download and run the installer (not recommended), anything from 1.20.2 onwards works flawlessly with no inverention needed.
+
+# Steps
+1. Download and create server using the template, give the server a name.
+2. In the options tab of the server creation read and check the EULA agreement (or in the settings tab if you ignored and already created the server). No I cannot do that for you.
+3. Set java version based on what is on your server (or use the default 17 to use pufferpanel's default)
+4. Set Dedicated RAM amount (Default 1024 is 1 GB, 4096 (4 GB) should be fine for 4 simulatenous players and reasonable view distance (< 16), otherwise 8192 (8 GB) for higher view distance or heavier mods. Minecraft does not effectively utilise more than this, but SPECIFIC mods might)
+5. Set a port. Match this to your port forward for domestic servers, or SRV record for a server behind a DNS.
+6. Set neo(forged) version. This will also dictate your minecraft server's version, so choose correctly.
+7. Click crete, then when the server is created click install. A wall of text should indicate downloading, if there is only a few lines you've done something wrong (probably neo version). The server will start automatically.
+8. Connect and have fun. Raise an issue on github if the script stops working.