-
Notifications
You must be signed in to change notification settings - Fork 59
Add minecraft gtnh egg #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DJSchaffner
wants to merge
6
commits into
pterodactyl:main
Choose a base branch
from
DJSchaffner:add-minecraft-gtnh-egg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+84
−1
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3b107e4
Add GT:NH server egg
DJSchaffner e0b1d30
Add gtnh to java minecraft readme
DJSchaffner d8d2c27
Remove trailing slash in gtnh path
DJSchaffner a995dac
Use server memory in startup
DJSchaffner facb371
Use more robust download link extraction for specific version
DJSchaffner 025b65f
Remove redundant jvm option
DJSchaffner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # GregTech:New Horizons | ||
|
|
||
| Standalone Minecraft server with GregTech:New Horizons using Java 21. | ||
|
|
||
| Supports upgrading / downgrading via reinstall and keeps world, backups and some key config files. | ||
| Check installation logs for what has been removed in the process and make sure to backup any additional data. | ||
|
|
||
| [GT:NH Github](https://github.com/GTNewHorizons/GT-New-Horizons-Modpack) | ||
| [GT:NH Wiki](https://gtnh.miraheze.org/wiki/Main_Page) | ||
| [Server Setup](https://gtnh.miraheze.org/wiki/Server_Setup) | ||
|
|
||
| ## Server Ports | ||
|
|
||
| The GT:NH server requires a single port for access (default 25565). | ||
|
|
||
| | Port | default | | ||
| |-------|---------| | ||
| | Game | 25565 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| { | ||
| "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", | ||
| "meta": { | ||
| "version": "PTDL_v2", | ||
| "update_url": null | ||
| }, | ||
| "exported_at": "2025-04-05T21:16:28+02:00", | ||
| "name": "GregTech:New Horizons", | ||
| "author": "[email protected]", | ||
| "description": "Minecraft GregTech:New Horizons Server", | ||
| "features": [ | ||
| "eula", | ||
| "java_version", | ||
| "pid_limit" | ||
| ], | ||
| "docker_images": { | ||
| "ghcr.io\/pterodactyl\/yolks:java_21": "ghcr.io\/pterodactyl\/yolks:java_21" | ||
| }, | ||
| "file_denylist": [], | ||
| "startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -Dfml.readTimeout=180 @java9args.txt -jar lwjgl3ify-forgePatches.jar nogui", | ||
| "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\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n # Use tail just to make sure there are not multiple versions matching\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\n# Space separated blacklist for files to keep (limitation of ash)\r\nBLACKLIST=\"backups world server.properties whitelist.json banned-players.json banned-ips.json ops.json\"\r\necho -e \"Removing files from previous installation (Keeping world, backups, properties, whitelist, banned players and ops)\"\r\n\r\n# Loop all files in base directory and remove files\/folders not in blacklist\r\nfor file in .\/*; do\r\n filename=$(basename \"$file\")\r\n match=false\r\n \r\n for pattern in $BLACKLIST; do\r\n if [[ \"$(echo \"$filename\" | tr '[:upper:]' '[:lower:]')\" = \"$(echo \"$pattern\" | tr '[:upper:]' '[:lower:]')\" ]]; then\r\n match=true\r\n break\r\n fi\r\n done\r\n \r\n if [ \"$match\" != true ]; then\r\n echo -e \"Removing: $filename\"\r\n rm -rf \"$file\"\r\n else\r\n echo -e \"Keeping: $filename\"\r\n fi\r\ndone\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\n\r\necho -e \"Installation process is completed\"", | ||
| "container": "ghcr.io\/pterodactyl\/installers:alpine", | ||
| "entrypoint": "ash" | ||
| } | ||
| }, | ||
| "variables": [ | ||
| { | ||
| "name": "GT:NH Version", | ||
| "description": "The version of GregTech:New Horizons to use. Set to \"latest\" for latest version, or specify a version number.\r\nExample: 2.7.0", | ||
| "env_variable": "GTNH_VERSION", | ||
| "default_value": "latest", | ||
| "user_viewable": true, | ||
| "user_editable": true, | ||
| "rules": "required|string|max:20", | ||
| "field_type": "text" | ||
| }, | ||
| { | ||
| "name": "Use Beta Version", | ||
| "description": "Enable if you want to use a beta version", | ||
| "env_variable": "IS_BETA_VERSION", | ||
| "default_value": "0", | ||
| "user_viewable": true, | ||
| "user_editable": true, | ||
| "rules": "required|boolean", | ||
| "field_type": "text" | ||
| } | ||
| ] | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.