N
描述
NeoForge 服务器。NeoForge 是一个模组 API(应用程序编程接口),它使得创建模组更加容易,同时也确保模组之间能够相互兼容。NeoForge 是 Minecraft Forge 的一个分支。
95 浏览
14 下载
2026-06-30
更新于 1 天前
预设配置详情
NeoForge 🦊
这是一个用于NeoForge独立服务器的通用安装包。
NeoForge是Minecraft Forge的一个分支,适用于1.20.1或更新的版本。安装脚本基于官方Forge安装脚本。
该安装包支持下载最新或指定Minecraft版本的NeoForge,也支持下载特定版本的NeoForge。
服务器端口
Minecraft服务器需要一个端口用于访问(默认25565),但插件可能需要启用额外的端口。
| 端口 | 默认值 |
|---|---|
| Minecraft | 25565 |
registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_8
registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_11
registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_16
registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_17
registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_21
registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_25
java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true @unix_args.txt
| 变量名 | 变量 | 描述 | 默认值 | 规则 | 可查看 | 可编辑 |
|---|---|---|---|---|---|---|
| 我的世界版本 | MC_VERSION |
你想要安装的Minecraft版本。 保留为latest将安装最新版本。 | latest |
required|string|max:9
必填 字符串 最大 9
|
||
| NeoForge 版本 | NEOFORGE_VERSION |
完整精确的版本号。 例如:20.4.194 或 1.20.1-47.1.95 覆盖 MC_VERSION。如果无法下载服务器文件,安装将失败。 | |
nullable|regex:/^[0-9\.\-]+$/
可选 匹配: /^[0-9\.\-]+$/
|
镜像
registry.cn-shanghai.aliyuncs.com/pterodactyl-images/installers:debian
入口
bash
#!/bin/bash
# NeoForge Installation Script
#
# Server Files: /mnt/server
apt-get update
apt-get install -y curl xq openjdk-17-jdk
if [[ ! -d /mnt/server ]]; then
mkdir /mnt/server
fi
cd /mnt/server
# Remove spaces from the version number to avoid issues with curl
NEOFORGE_VERSION="$(echo "$NEOFORGE_VERSION" | tr -d ' ')"
MC_VERSION="$(echo "$MC_VERSION" | tr -d ' ')"
# If we have a specific NeoForge version set, use that
if [[ ! -z ${NEOFORGE_VERSION} ]]; then
# The 1.20.1 release lives in a different repository and is called "forge" instead of "neoforge"
if [[ "${NEOFORGE_VERSION}" =~ "1.20.1-" ]]; then
DOWNLOAD_LINK=https://maven.neoforged.net/releases/net/neoforged/forge/${NEOFORGE_VERSION}/forge-${NEOFORGE_VERSION}
ARTIFACT_NAME="forge"
else
DOWNLOAD_LINK=https://maven.neoforged.net/releases/net/neoforged/neoforge/${NEOFORGE_VERSION}/neoforge-${NEOFORGE_VERSION}
ARTIFACT_NAME="neoforge"
fi
else
# For NeoForge, downloading based on a Minecraft version is done by using the Maven metadata.
# 1.20.1 is also handled differently here, because it's in a different repository and is called
# "forge" instead of "neoforge".
if [[ "${MC_VERSION}" == "1.20.1" ]]; then
XML_DATA=$(curl -sSL https://maven.neoforged.net/releases/net/neoforged/forge/maven-metadata.xml)
ARTIFACT_NAME="forge"
NEOFORGE_OLD=1
else
XML_DATA=$(curl -sSL https://maven.neoforged.net/releases/net/neoforged/neoforge/maven-metadata.xml)
ARTIFACT_NAME="neoforge"
fi
REPO_URL="https://maven.neoforged.net/releases/net/neoforged/${ARTIFACT_NAME}/"
# Get the latest version of Minecraft NeoForge supports. Here XML_DATA contains the metadata for
# the new, "neoforge" repository, which is good since 1.20.1 will never be the latest anymore.
if [[ "${MC_VERSION}" == "latest" ]] || [[ "${MC_VERSION}" == "" ]]; then
echo "Getting latest version of NeoForge."
MC_VERSION="1.$(echo -e ${XML_DATA} | xq -x '/metadata/versioning/release' | cut -d'.' -f1-2)"
fi
echo "Minecraft version: ${MC_VERSION}"
if [[ -z "${NEOFORGE_OLD}" ]]; then
# For modern artifacts we cut the "1." from the Minecraft version, and search for that
VERSION_KEY=$(echo -n ${MC_VERSION} | cut -d'.' -f2-)
else
# For 1.20.1, it uses the same naming scheme as Forge, so we just append a dash
VERSION_KEY="${MC_VERSION}-"
fi
# Then we extract the latest the latest NeoForge version available based on the Maven metadata
NEOFORGE_VERSION=$(echo -e ${XML_DATA} | xq -x "(/metadata/versioning/versions/*[starts-with(text(), '${VERSION_KEY}')])" | tail -n1)
if [[ -z "${NEOFORGE_VERSION}" ]]; then
echo "The install failed, because there is no valid version of NeoForge for the version of Minecraft selected."
exit 1
fi
echo "NeoForge version: ${NEOFORGE_VERSION}"
DOWNLOAD_LINK="${REPO_URL}${NEOFORGE_VERSION}/${ARTIFACT_NAME}-${NEOFORGE_VERSION}"
fi
echo "Downloading NeoForge version ${NEOFORGE_VERSION}"
echo "Download link is ${DOWNLOAD_LINK}"
# Check if the download link we generated is valid
if [[ ! -z "${DOWNLOAD_LINK}" ]]; then
if curl --output /dev/null --silent --head --fail ${DOWNLOAD_LINK}-installer.jar; then
echo -e "Installer jar download link is valid."
else
echo -e "Link is invalid. Exiting now"
exit 2
fi
else
echo -e "No download link provided. Exiting now"
exit 3
fi
# If so, go ahead and download the installer
curl -s -o installer.jar -sS ${DOWNLOAD_LINK}-installer.jar
if [[ ! -f ./installer.jar ]]; then
echo "!!! Error downloading NeoForge version ${NEOFORGE_VERSION} !!!"
exit 4
fi
# Delete args to support downgrading/upgrading
rm -rf libraries/net/neoforged/${ARTIFACT_NAME}
rm unix_args.txt
# Installing server
echo -e "Installing NeoForge server.
"
java -jar installer.jar --installServer || {
echo -e "
Install failed using NeoForge version ${NEOFORGE_VERSION} and Minecraft version ${MINECRAFT_VERSION}."
echo -n "Should you be using unlimited memory value of 0, make sure to increase the default install resource limits in the Wings"
echo "config or specify exact allocated memory in the server Build Configuration instead of 0!"
echo "Otherwise, the NeoForge installer will not have enough memory.";
exit 5;
}
# Symlink the startup arguments to the server directory
ln -sf libraries/net/neoforged/${ARTIFACT_NAME}/*/unix_args.txt unix_args.txt
# And finally clean up
echo -e "Deleting installer.jar file.
"
rm -rf installer.jar
echo "Installation process is completed!"
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": "https://eggs.pterodactyl.top/eggs/168/download/egg-neoforge.json"
},
"exported_at": "2024-11-13T15:30:48+01:00",
"name": "NeoForge",
"author": "glorantv@icloud.com",
"description": "NeoForge 服务器。NeoForge 是一个模组 API(应用程序编程接口),它使得创建模组更加容易,同时也确保模组之间能够相互兼容。NeoForge 是 Minecraft Forge 的一个分支。",
"features": [
"eula",
"java_version",
"pid_limit"
],
"docker_images": {
"Java 8": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_8",
"Java 11": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_11",
"Java 16": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_16",
"Java 17": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_17",
"Java 21": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_21",
"Java 25": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_25"
},
"file_denylist": [],
"startup": "java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true @unix_args.txt",
"config": {
"files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"server-port\": \"{{server.build.default.port}}\",\r\n \"query.port\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \")! For help, type \"\r\n}",
"logs": "{}",
"stop": "stop"
},
"scripts": {
"installation": {
"script": "#!/bin/bash\n# NeoForge Installation Script\n#\n# Server Files: /mnt/server\n\napt-get update\napt-get install -y curl xq openjdk-17-jdk\n\nif [[ ! -d /mnt/server ]]; then\n mkdir /mnt/server\nfi\n\ncd /mnt/server\n\n# Remove spaces from the version number to avoid issues with curl\nNEOFORGE_VERSION=\"$(echo \"$NEOFORGE_VERSION\" | tr -d ' ')\"\nMC_VERSION=\"$(echo \"$MC_VERSION\" | tr -d ' ')\"\n\n# If we have a specific NeoForge version set, use that\nif [[ ! -z ${NEOFORGE_VERSION} ]]; then\n # The 1.20.1 release lives in a different repository and is called \"forge\" instead of \"neoforge\"\n if [[ \"${NEOFORGE_VERSION}\" =~ \"1.20.1-\" ]]; then\n DOWNLOAD_LINK=https://maven.neoforged.net/releases/net/neoforged/forge/${NEOFORGE_VERSION}/forge-${NEOFORGE_VERSION}\n ARTIFACT_NAME=\"forge\"\n else\n DOWNLOAD_LINK=https://maven.neoforged.net/releases/net/neoforged/neoforge/${NEOFORGE_VERSION}/neoforge-${NEOFORGE_VERSION}\n ARTIFACT_NAME=\"neoforge\"\n fi\nelse\n # For NeoForge, downloading based on a Minecraft version is done by using the Maven metadata.\n # 1.20.1 is also handled differently here, because it's in a different repository and is called\n # \"forge\" instead of \"neoforge\".\n if [[ \"${MC_VERSION}\" == \"1.20.1\" ]]; then\n XML_DATA=$(curl -sSL https://maven.neoforged.net/releases/net/neoforged/forge/maven-metadata.xml)\n ARTIFACT_NAME=\"forge\"\n NEOFORGE_OLD=1\n else\n XML_DATA=$(curl -sSL https://maven.neoforged.net/releases/net/neoforged/neoforge/maven-metadata.xml)\n ARTIFACT_NAME=\"neoforge\"\n fi\n\n REPO_URL=\"https://maven.neoforged.net/releases/net/neoforged/${ARTIFACT_NAME}/\"\n\n # Get the latest version of Minecraft NeoForge supports. Here XML_DATA contains the metadata for\n # the new, \"neoforge\" repository, which is good since 1.20.1 will never be the latest anymore.\n if [[ \"${MC_VERSION}\" == \"latest\" ]] || [[ \"${MC_VERSION}\" == \"\" ]]; then\n echo \"Getting latest version of NeoForge.\"\n MC_VERSION=\"1.$(echo -e ${XML_DATA} | xq -x '/metadata/versioning/release' | cut -d'.' -f1-2)\"\n fi\n\n echo \"Minecraft version: ${MC_VERSION}\"\n\n if [[ -z \"${NEOFORGE_OLD}\" ]]; then\n # For modern artifacts we cut the \"1.\" from the Minecraft version, and search for that\n VERSION_KEY=$(echo -n ${MC_VERSION} | cut -d'.' -f2-)\n else\n # For 1.20.1, it uses the same naming scheme as Forge, so we just append a dash\n VERSION_KEY=\"${MC_VERSION}-\"\n fi\n\n # Then we extract the latest the latest NeoForge version available based on the Maven metadata\n NEOFORGE_VERSION=$(echo -e ${XML_DATA} | xq -x \"(/metadata/versioning/versions/*[starts-with(text(), '${VERSION_KEY}')])\" | tail -n1)\n if [[ -z \"${NEOFORGE_VERSION}\" ]]; then\n echo \"The install failed, because there is no valid version of NeoForge for the version of Minecraft selected.\"\n exit 1\n fi\n\n echo \"NeoForge version: ${NEOFORGE_VERSION}\"\n\n DOWNLOAD_LINK=\"${REPO_URL}${NEOFORGE_VERSION}/${ARTIFACT_NAME}-${NEOFORGE_VERSION}\"\nfi\n\necho \"Downloading NeoForge version ${NEOFORGE_VERSION}\"\necho \"Download link is ${DOWNLOAD_LINK}\"\n\n# Check if the download link we generated is valid\nif [[ ! -z \"${DOWNLOAD_LINK}\" ]]; then\n if curl --output /dev/null --silent --head --fail ${DOWNLOAD_LINK}-installer.jar; then\n echo -e \"Installer jar download link is valid.\"\n else\n echo -e \"Link is invalid. Exiting now\"\n exit 2\n fi\nelse\n echo -e \"No download link provided. Exiting now\"\n exit 3\nfi\n\n# If so, go ahead and download the installer\ncurl -s -o installer.jar -sS ${DOWNLOAD_LINK}-installer.jar\n\nif [[ ! -f ./installer.jar ]]; then\n echo \"!!! Error downloading NeoForge version ${NEOFORGE_VERSION} !!!\"\n exit 4\nfi\n\n# Delete args to support downgrading/upgrading\nrm -rf libraries/net/neoforged/${ARTIFACT_NAME}\nrm unix_args.txt\n\n# Installing server\necho -e \"Installing NeoForge server.\\n\"\njava -jar installer.jar --installServer || {\n echo -e \"\\nInstall failed using NeoForge version ${NEOFORGE_VERSION} and Minecraft version ${MINECRAFT_VERSION}.\"\n echo -n \"Should you be using unlimited memory value of 0, make sure to increase the default install resource limits in the Wings\"\n echo \"config or specify exact allocated memory in the server Build Configuration instead of 0!\"\n echo \"Otherwise, the NeoForge installer will not have enough memory.\";\n exit 5;\n}\n\n# Symlink the startup arguments to the server directory\nln -sf libraries/net/neoforged/${ARTIFACT_NAME}/*/unix_args.txt unix_args.txt\n\n# And finally clean up\necho -e \"Deleting installer.jar file.\\n\"\nrm -rf installer.jar\n\necho \"Installation process is completed!\"",
"container": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "我的世界版本",
"description": "你想要安装的Minecraft版本。\n\n保留为latest将安装最新版本。",
"env_variable": "MC_VERSION",
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:9",
"field_type": "text"
},
{
"name": "NeoForge 版本",
"description": "完整精确的版本号。\n\n例如:20.4.194 或 1.20.1-47.1.95\n\n覆盖 MC_VERSION。如果无法下载服务器文件,安装将失败。",
"env_variable": "NEOFORGE_VERSION",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|regex:/^[0-9\\.\\-]+$/",
"field_type": "text"
}
]
}附属文件
暂无附属文件
提交历史
Fork 关系
查看关系图暂无 Fork,成为第一个 Fork 的人吧!
统计
95
浏览
14
下载
0
星标
0
复刻
作者
飒
飒爽师叔
UID: 1
279 预设
·
2026-06