Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 809cdfb

Browse files
authored
Add server pack (#70)
1 parent 34f9ff3 commit 809cdfb

5 files changed

Lines changed: 372 additions & 1 deletion

File tree

.github/workflows/serverPack.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI Server Pack
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on release
8+
release:
9+
types: [published]
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
# This workflow contains a single job called "build"
14+
build:
15+
# The type of runner that the job will run on
16+
runs-on: ubuntu-latest
17+
18+
# Steps represent a sequence of tasks that will be executed as part of the job
19+
steps:
20+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+
- uses: actions/checkout@v2
22+
23+
- name: Extract tag name
24+
id: tag
25+
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
26+
27+
# Runs a set of commands using the runners shell
28+
- name: Collect files for server pack
29+
run: |
30+
cp -r template/ server/world/
31+
cp LICENSE server/LICENSE
32+
sed -i 's#modpackplaceholderurl#https://github.com/${{ github.repository }}/releases/download/${{ steps.tag.outputs.version }}/CraftBlock-${{ steps.tag.outputs.version }}.zip#g' server/server-setup-config.yaml
33+
cd server/
34+
zip -r ../craftBlockServer.zip *
35+
36+
- name: Upload file to GitHub release
37+
uses: svenstaro/upload-release-action@2.2.1
38+
with:
39+
repo_token: ${{ secrets.GITHUB_TOKEN }}
40+
file: craftBlockServer.zip
41+
asset_name: CraftBlock-Server-${{ steps.tag.outputs.version }}.zip
42+
tag: ${{ github.ref }}

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Ignore everything...
22
*
33

4-
# except for the gitignore file
4+
# except for git files
55
!.gitignore
6+
!.github/
7+
!.github/**
68

79
# except the scripts folder
810

@@ -52,3 +54,9 @@
5254
# gradle
5355
/advancements/.gradle
5456
/advancements/build
57+
58+
# server pack
59+
!server/
60+
!server/server-setup-config.yaml
61+
!server/startserver.bat
62+
!server/startserver.sh

server/server-setup-config.yaml

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
# https://github.com/AllTheMods/alltheservers
2+
#
3+
# The MIT License (MIT)
4+
#
5+
# Copyright (c) 2018 BloodWorkXGaming
6+
#
7+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8+
#
9+
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10+
#
11+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12+
13+
14+
# Version of the specs, only for internal usage if this format should ever change drastically
15+
_specver: 2
16+
17+
# modpack related settings, changes the supposed to change the visual appearance of the launcher
18+
modpack:
19+
# Name of the mod pack, that is displayed in various places where it fits
20+
name: CraftBlock
21+
22+
# Description
23+
description: CraftBlock stands for Craft Attack 3 Skyblock and is an expert skyblock modpack like FTB Infinity Evolved Skyblock.
24+
25+
26+
# settings regarding the installation of the modpack
27+
install:
28+
# version of minecraft, needs the exact version
29+
mcVersion: 1.12.2
30+
31+
# exact version of forge or fabric that is supposed to be used
32+
# if this value is a null value so ( ~, null, or "" ) then the version from the mod pack is going to be used
33+
loaderVersion: ~
34+
35+
# If a custom installer is supposed to used, specify the url here: (Otherwise put "", ~ or null here)
36+
# supports variables: {{@loaderversion@}} and {{@mcversion@}}
37+
# For forge: "http://files.minecraftforge.net/maven/net/minecraftforge/forge/{{@mcversion@}}-{{@loaderversion@}}/forge-{{@mcversion@}}-{{@loaderversion@}}-installer.jar"
38+
# For Fabric: "https://maven.fabricmc.net/net/fabricmc/fabric-installer/{{@loaderversion@}}/fabric-installer-{{@loaderversion@}}.jar"
39+
installerUrl: http://files.minecraftforge.net/maven/net/minecraftforge/forge/{{@mcversion@}}-{{@loaderversion@}}/forge-{{@mcversion@}}-{{@loaderversion@}}-installer.jar
40+
41+
# Installer Arguments
42+
# These Arguments have to be passed to the installer
43+
#
44+
# For Fabric:
45+
# installerArguments:
46+
# - "server"
47+
# - "-downloadMinecraft"
48+
# - "-snapshot"
49+
# - "-mcversion"
50+
# - "1.16.4"
51+
# - "-loader"
52+
# - "0.10.6+build.214"
53+
#
54+
# For Forge:
55+
# installerArguments:
56+
# - "--installServer"
57+
installerArguments:
58+
- "--installServer"
59+
60+
# Link to where the file where the modpack can be distributed
61+
# This supports loading from local files as well for most pack types if there is file://{PathToFile} in the beginning
62+
modpackUrl: modpackplaceholderurl
63+
64+
# This is used to specify in which format the modpack is distributed, the server launcher has to handle each individually if their format differs
65+
# current supported formats:
66+
# - curseforge or curse
67+
# - curseid
68+
# - zip or zipfile
69+
modpackFormat: curse
70+
71+
# Settings which are specific to the format used, might not be needed in some casese
72+
formatSpecific:
73+
# optional paramenter used for curse to specify a whole project to ignore (mostly if it is client side only)
74+
ignoreProject:
75+
- 243478 # More Overlays
76+
- 250398 # Controlling
77+
- 268324 # Blur
78+
- 333760 # Splash Logo Color Fix
79+
- 237701 # ReAuth
80+
- 231275 # Ding
81+
- 226447 # Resource Loader
82+
- 60089 # Mouse Tweaks
83+
- 240630 # Just Enough Resources (JER)
84+
- 267939 # Just Enough HarvestCraft (JEHC)
85+
- 244019 # Lockdown
86+
87+
# The base path where the server should be installed to, ~ for current path
88+
baseInstallPath: ~
89+
90+
# a list of files which are supposed to be ignored when installing it from the client files
91+
# this can either use regex or glob {default glob: https://docs.oracle.com/javase/8/docs/api/java/nio/file/FileSystem.html#getPathMatcher-java.lang.String-}
92+
# specify with regex:.... or glob:.... if you want to force a matching type
93+
ignoreFiles:
94+
- resources/**
95+
96+
# often a server needs more files, which are nearly useless on the client, such as tickprofiler
97+
# This is a list of files, each ' - ' is a new file:
98+
# url is the directlink to the file, destination is the path to where the file should be copied to
99+
# additionalFiles:
100+
# - url: https://media.forgecdn.net/files/3101/200/tellme-fabric-1.16.4-0.9.1-beta.1.jar
101+
# destination: mods/tellme-fabric-1.16.4-0.9.1-beta.1.jar
102+
# - url: https://media.forgecdn.net/files/3097/870/blocklogger-0.2.1.jar
103+
# destination: mods/blocklogger-0.2.1.jar
104+
# - url: https://media.forgecdn.net/files/3072/467/BlueMap-1.2.0-snap-fabric-1.16.3.jar
105+
# destination: mods/BlueMap-1.2.0-snap-fabric-1.16.3.jar
106+
# - url: https://media.forgecdn.net/files/3082/894/hypnos-0.1.1.jar
107+
# destination: mods/hypnos-0.1.1.jar
108+
# - url: https://media.forgecdn.net/files/3109/728/InvView-1.2.0-1.16.2%2B.jar
109+
# destination: mods/InvView-1.2.0-1.16.2%2B.jar
110+
# - url: https://media.forgecdn.net/files/3098/760/FabriKommander-1.0.0-MC1.16.3.jar
111+
# destination: mods/FabriKommander-1.0.0-MC1.16.3.jar
112+
# - url: https://media.forgecdn.net/files/3104/633/flan-1.16.2-1.1.4.jar
113+
# destination: mods/flan-1.16.2-1.1.4.jar
114+
# - url: https://ci.lucko.me/job/spark/lastSuccessfulBuild/artifact/spark-fabric/build/libs/spark-fabric.jar
115+
# destination: mods/spark-fabric.jar
116+
# - url: https://media.forgecdn.net/files/3115/560/disfabric-1.16.4-1.2.0.jar
117+
# destination: mods/disfabric-1.16.4-1.2.0.jar
118+
# - url: https://media.forgecdn.net/files/3009/753/shutupconsole-1.1.jar
119+
# destination: mods/shutupconsole-1.1.jar
120+
# - url: https://cdn.discordapp.com/attachments/750220836191076383/778900805402492958/advdebug-2.2.0.jar
121+
# destination: mods/advdebug-2.2.0.jar
122+
123+
# For often there are config which the user wants to change, here is the place to put the local path to configs, jars or whatever
124+
# You can copy files or folders:
125+
#
126+
# localFiles:
127+
# - from: OLD_TO_DELETE/config/disfabric.json5
128+
# to: config/disfabric.json5
129+
# - from: OLD_TO_DELETE/config/charm.toml
130+
# to: config/charm.toml
131+
# - from: OLD_TO_DELETE/config/hypnos.json
132+
# to: config/hypnos.json
133+
# - from: OLD_TO_DELETE/config/shutupconsole.toml
134+
# to: config/shutupconsole.toml
135+
# - from: OLD_TO_DELETE/kubejs/server_scripts/custom.js
136+
# to: kubejs/server_scripts/custom.js
137+
# - from: OLD_TO_DELETE/config/indrev/cables.json
138+
# to: config/indrev/cables.json
139+
140+
# This makes the program check the folder for whether it is supposed to use the
141+
checkFolder: yes
142+
143+
# Whether to install the Loader (Forge or Fabric) or not, should always be yes/true unless you only want to install the pack
144+
installLoader: yes
145+
146+
# Sponge bootstrapper jar URL
147+
# Only needed if you have spongefix enabled
148+
spongeBootstrapper: https://github.com/simon816/SpongeBootstrap/releases/download/v0.7.1/SpongeBootstrap-0.7.1.jar
149+
150+
151+
152+
153+
# settings regarding the launching of the pack
154+
launch:
155+
# applies the launch wrapper to fix sponge for a few mods
156+
spongefix: no
157+
158+
# Use a RAMDisk for the world folder
159+
# case-sensitive; use only lowercase `yes` or `no`
160+
# NOTE: The server must have run once fully before switching to `yes`!
161+
ramDisk: no
162+
163+
# checks with the help of a few unrelated server whether the server is online
164+
checkOffline: no
165+
166+
# specifies the max amount of ram the server is supposed to launch with
167+
maxRam: 4G
168+
169+
# specifies the minimal amount of ram the server is supposed to launch with
170+
# minRam: 4G
171+
172+
# specifies whether the server is supposed to auto restart after crash
173+
autoRestart: yes
174+
175+
# after a given amount of crashes in a given time the server will stop auto restarting
176+
crashLimit: 10
177+
178+
# Time a crash should be still accounted for in the {crashLimit}
179+
# syntax is either [number]h or [number]min or [number]s
180+
crashTimer: 60min
181+
182+
# Arguments that need to go before the 'java' argument, something like linux niceness
183+
# This is only a string, not a list.
184+
preJavaArgs: ~
185+
186+
# Start File Name, variables: {{@loaderversion@}} and {{@mcversion@}}
187+
# This has to be the name the installer spits out
188+
# For Forge 1.12-: "forge-{{@mcversion@}}-{{@loaderversion@}}-universal.jar"
189+
# For Forge 1.13+: "forge-{{@mcversion@}}-{{@loaderversion@}}.jar"
190+
# For Fabric: "fabric-server-launch.jar"
191+
startFile: forge-{{@mcversion@}}-{{@loaderversion@}}.jar
192+
193+
# In case you have multiple javas installed you can add a absolute path to it here
194+
# if the value is "", null, or ~ then 'java' from PATH is going to be used
195+
# Example: "\"C:/Program Files/Java/jre1.8.0_201/bin/java.exe\""
196+
forcedJavaPath: ~
197+
198+
# Java args that are supposed to be used when the server launches
199+
# keep in mind java args often need ' - ' in front of it to work, use clarifying parentheses to make sure it uses it correctly
200+
# Keep in mind that some arguments only work on JRE 1.8
201+
javaArgs:
202+
- "-XX:+UseG1GC"
203+
- "-XX:+ParallelRefProcEnabled"
204+
- "-XX:MaxGCPauseMillis=30"
205+
- "-XX:+UnlockExperimentalVMOptions"
206+
- "-XX:+DisableExplicitGC"
207+
- "-XX:+AlwaysPreTouch"
208+
- "-XX:G1NewSizePercent=30"
209+
- "-XX:G1MaxNewSizePercent=40"
210+
- "-XX:G1HeapRegionSize=8M"
211+
- "-XX:G1ReservePercent=25"
212+
- "-XX:G1HeapWastePercent=5"
213+
- "-XX:G1MixedGCCountTarget=4"
214+
- "-XX:InitiatingHeapOccupancyPercent=15"
215+
- "-XX:G1MixedGCLiveThresholdPercent=90"
216+
- "-XX:G1RSetUpdatingPauseTimePercent=5"
217+
- "-XX:SurvivorRatio=32"
218+
- "-XX:+PerfDisableSharedMem"
219+
- "-XX:MaxTenuringThreshold=1"
220+
- "-Dusing.aikars.flags=https://mcflags.emc.gs"
221+
- "-Daikars.new.flags=true"
222+
- "-XX:ConcGCThreads=3"
223+
- "-XX:ParallelGCThreads=12"

server/startserver.bat

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
REM https://github.com/AllTheMods/alltheservers
2+
REM
3+
REM The MIT License (MIT)
4+
REM
5+
REM Copyright (c) 2018 BloodWorkXGaming
6+
REM
7+
REM Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8+
REM
9+
REM The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10+
REM
11+
REM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12+
@ECHO OFF
13+
SETLOCAL
14+
15+
16+
:BEGIN
17+
CLS
18+
COLOR 3F >nul 2>&1
19+
SET MC_SYS32=%SYSTEMROOT%\SYSTEM32
20+
REM Make batch directory the same as the directory it's being called from
21+
REM For example, if "run as admin" the batch starting dir could be system32
22+
CD "%~dp0" >nul 2>&1
23+
24+
25+
:CHECKJAVA
26+
ECHO INFO: Checking java installation...
27+
ECHO.
28+
29+
REM If no Java is installed this line will catch it simply
30+
java -version >nul 2>&1
31+
ECHO.
32+
IF %ERRORLEVEL% EQU 0 (
33+
ECHO INFO: Found Java.
34+
GOTO CHECK
35+
) ELSE (
36+
GOTO JAVAERROR
37+
)
38+
39+
:MAIN
40+
java -jar serverstarter-2.0.1.jar
41+
GOTO EOF
42+
43+
:CHECK
44+
REM Check if serverstarter JAR is already downloaded
45+
IF NOT EXIST "%cd%\serverstarter-2.0.1.jar" (
46+
ECHO serverstarter binary not found, downloading serverstarter...
47+
%SYSTEMROOT%\SYSTEM32\bitsadmin.exe /rawreturn /nowrap /transfer starter /dynamic /download /priority foreground https://github.com/AllTheMods/alltheservers/releases/download/2.0.1/serverstarter-2.0.1.jar "%cd%\serverstarter-2.0.1.jar"
48+
GOTO MAIN
49+
) ELSE (
50+
GOTO MAIN
51+
)
52+
53+
54+
:JAVAERROR
55+
COLOR CF
56+
ECHO ERROR: Could not find Java installed or in PATH
57+
PAUSE
58+
59+
60+
:EOF
61+
pause

server/startserver.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
#
3+
# https://github.com/AllTheMods/alltheservers
4+
#
5+
# The MIT License (MIT)
6+
#
7+
# Copyright (c) 2018 BloodWorkXGaming
8+
#
9+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14+
set -euo pipefail
15+
16+
# check for serverstarter jar
17+
if [[ -f serverstarter-2.0.1.jar ]]; then
18+
echo "Skipping download. Using existing serverstarter-2.0.1.jar"
19+
java -jar serverstarter-2.0.1.jar
20+
exit 0
21+
else
22+
# download missing serverstarter jar
23+
URL="https://github.com/AllTheMods/alltheservers/releases/download/2.0.1/serverstarter-2.0.1.jar"
24+
25+
if command -v wget &> /dev/null; then
26+
echo "DEBUG: (wget) Downloading ${URL}"
27+
wget -O serverstarter-2.0.1.jar "${URL}"
28+
elif command -v curl &> /dev/null; then
29+
echo "DEBUG: (curl) Downloading ${URL}"
30+
curl -o serverstarter-2.0.1.jar "${URL}"
31+
else
32+
echo "Neither wget or curl were found on your system. Please install one and try again"
33+
exit 1
34+
fi
35+
fi
36+
37+
java -jar serverstarter-2.0.1.jar

0 commit comments

Comments
 (0)