Skip to content

Commit 19628f6

Browse files
author
Dijkstra
authored
Merge pull request #5 from AllTheMods/dev
Major update
2 parents da89274 + debdb3d commit 19628f6

File tree

5 files changed

+983
-303
lines changed

5 files changed

+983
-303
lines changed

Diff for: LICENSE.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
2+
# Custom License
3+
The *only* reason we included a license is because we wanted it to be **easier** for more people to use/share this. Some places (i.e. Curse) need some form of "official" notice allowing content to be used. Since we were making a license anyway, we thought it would be nice to add an attribution clause so others didn't try to claim our work as their own. The result is this custom license based on a combination of the [MIT license](https://opensource.org/licenses/MIT) and a couple parts from Vaskii's [Botania](http://botaniamod.net/license.php)/[Psi](http://psi.vazkii.us/license.php) license:
4+
```
5+
Copyright (c) 2017 All The Mods Team
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
You must give appropriate credit to the "All The Mods Team" as original
15+
creators for any parts of this Software being used. A link back to original
16+
content is optional but would be greatly appreciated.
17+
18+
It is forbidden to charge for access to the distribution of this Software or
19+
gain money through it. This includes any type of inline advertisement, such
20+
as url shorteners (adf.ly or otherwise) or ads. This also includes
21+
restricting any amount of access behind a paywall. Special permission is
22+
given to allow this Software to be bundled or distributed with projects on
23+
Curse.com, CurseForge.com or their related sub-domains and subsidiaries.
24+
25+
Derivative works must be open source (have its source visible and allow for
26+
redistribution and modification).
27+
28+
The above copyright notice and conditions must be included in all copies or
29+
substantial portions of the Software, including derivative works and
30+
re-licensing thereof.
31+
```
32+
33+
____________________________
34+
## DISCLAIMERS
35+
36+
"All The Mods Team" is not affiliated with "Mojang," "Oracle," "Curse," "Twitch," "Sponge," "Forge" or any other entity (or entity owning a referenced product) potentially mentioned in this document or relevant source code for this Software. The use of their names and/or trademarks is strictly circumstantial and assumed fair-use. All credit for their respective works, software, branding, copyrights and/or trademarks belongs entirely to them as original owners/licensers.
37+
38+
```
39+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
44+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45+
SOFTWARE.
46+
```
47+
48+
49+
_______________________________
50+
51+
52+
<br>
53+
<br>
54+
<br>
55+
<br>
56+
<p align="center">
57+
<img src="https://i1.wp.com/allthepacks.com/wp-content/uploads/2017/01/Abyus4d.png" alt="All The Mods" width="400" height="400">
58+
</p>
59+
<br>

Diff for: README.md

+197-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,197 @@
1-
# Server-Scripts
2-
Server Startup Scripts
1+
# Modpack ServerStart Scripts
2+
3+
Minecraft-Forge Server install/launcher script
4+
5+
Created and supported by the All The Mods Team with special thanks to @OrdinatorStouff and @Dijkstra
6+
7+
GitHub: https://github.com/AllTheMods/Server-Scripts
8+
AllTheMods Discord: https://discord.gg/FdFDVWb
9+
10+
Originally created for use in "All The Mods" modpacks, but is **free for anyone to use, modify or distribute** provided the conditions of the custom license (detailed below) are met.
11+
12+
<br>
13+
14+
<br>
15+
16+
<br>
17+
18+
19+
## Description
20+
#### OS Batch/Script to help install/run modpack servers. Available for Windows and Linux (Bash).
21+
22+
These scripts will fetch the appropriate Forge installer and install it. This will also install Mojang's distribution-restricted Minecraft binary and the required libraries.
23+
24+
After Forge/Minecraft are installed, the same script will act as a launcher to start the server, with an auto-restart-after-crash feature as well. (No need for a separate "install" script). It's also adaptable to smoothly transition to new versions of Forge *even on existing servers that have already been setup*. If the installed Forge version is different from what's supplied in the settings.cfg, the script will remove the old Forge and re-download and install the version specified. The script also performs *many* basic checks such as looking for a valid Java version installed and checking that EULA.txt has been updated.
25+
26+
All relevant settings are in the easily accessible "settings.cfg" file; Modpack creators can specify their pack's Minecraft and Forge versions, and server operators can specify JVM args and RAM allocation as desired.
27+
28+
IF THERE ARE ANY ISSUES
29+
Please make a report on the github linked above
30+
31+
32+
<br>
33+
34+
<br>
35+
36+
<br>
37+
38+
39+
# How To Use
40+
41+
#### Do not modify `ServerStart.bat` or `ServerStart.sh`
42+
#### All settings are modified in `settings.cfg` instead.
43+
44+
Windows: **`ServerStart.Bat`** *(Run/Double-Click)*
45+
Linux: **`bash ServerStart.sh`** *(must be bash, not shell/sh)*
46+
________________
47+
48+
### settings.cfg
49+
Formatting is very important for it to load correctly:
50+
* `SETTING=VALUE;`
51+
* No spaces around the equal sign
52+
* One setting per line
53+
* Semicolon immediately following value (no spaces)
54+
55+
56+
| Setting | Description | Example Value |
57+
| ----------|----------------------------| :------------:|
58+
| **MAX_RAM** | How much max RAM to allow the JVM to allocate to the server | `5G` |
59+
| **JAVA_ARGS** | The defaults provided should be best for most people, but can be edited if desired | *See Below* |
60+
| **CRASH_COUNT** | The max number of consecutive crashes that each occur within so many seconds of each other. If max is reaches, the script will exit. This is to stop spamming restarts of a server with a critical issue. | `8` |
61+
| **CRASH_TIMER** | The number of seconds to consider a crash within to be "consecutive" | `600` |
62+
| **RUN_FROM_BAD_FOLDER** | The scripts will not run from "temp" folders or "system" folders. If you want to force allow this, change the value to `1` | `0` |
63+
| **IGNORE_OFFLINE** | The scripts will not run if a connection to the internet can not be found. If you want to force allow (i.e. to run a server for local/LAN only) then set to `1`. Note, however that it will need internet connection to at least perform initial download/install of the Forge binaries | `0` |
64+
| **IGNORE_JAVA_CHECK** | By default, the script will stop/error if it can not find 64-bit Java 1.8 or 1.9. Some packs might be able to run with less than 4G or RAM or on older 1.7 java. If you want to use an older version or are limited to a 32-bit OS, setting this to `1` will let the script continue | `0` |
65+
| **USE_SPONGE** | Mostly unsupported and experimental. If set to `1` script will attempt to launch SpongeBootstrap but only if the bootstrap is present and SpongeForge is in Mods folder. This will not download/setup the required files either, merely launch the pack using them. **Sponge can cause undocumented errors and conflicts and therefore it's use is rarely supported by modpack developers. USE AT YOUR OWN RISK and only if you know what you're doing** | `0` |
66+
| **MODPACK_NAME** | Pack name to add flavor/description to script as it's running. Quotes are not needed. Can contain spaces. Technically can be very long, but will work better if short/concise (i.e. "Illumination" would be *much* better to use than "All The Mods Presents: Illumination") | `All The Mods` |
67+
| **MCVER** | Target Minecraft version. Usually set by pack dev before distributing and not intended to be changed by end-users. Must be complete/exact and matching the version on Forge's website (i.e. `1.10` is not the same as `1.10.2`) | `1.10.2` |
68+
| **FORGEVER** | Target Forge version. Usually set by pack dev before distributing and not intended to be changed by end-users. Requires the full version and exactly matching Forge's website. (i.e. `2254` will not work, but `12.18.3.2254` will) | `12.18.3.2281` |
69+
| **FORGEURL** | Direct url to a Forge "installer" jar. Mostly for debugging purposes, but if a URL is specified, the Forge installer of this link will be downloaded regardless of the previous settings.\* | `DISABLE` |
70+
71+
\**NOTE: Another debug/bypass options is for modpack creators to package and redistribute the forge installer matching their desired version as long as it's name matches the format: `forge-<MinecraftVersion>-<ForgeVersion>-installer.jar` If included, none will need to be downloaded first.*
72+
73+
<br>
74+
75+
<br>
76+
77+
<br>
78+
79+
80+
## Optional Java Arguments
81+
82+
Java can be tweaked with launch settings that can sometimes improve the performance of Minecraft over default (no launch options), especially for 1.10+ and larger packs such as All The Mods.
83+
84+
<br>
85+
86+
87+
______________________________
88+
**BASIC**
89+
These basic settings are recommended for general use for any modpack:
90+
```java
91+
-server -d64 -Xms1G -XX:+ExplicitGCInvokesConcurrent -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses -XX:+UseConcMarkSweepGC -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=50 -XX:UseSSE=3
92+
```
93+
94+
95+
<br>
96+
97+
98+
______________________________
99+
**HIGH RAM**
100+
If you have 10G or more RAM allocated to the Minecraft server, then these settings should make better use of the "extra" RAM:
101+
```java
102+
-server -d64 -Xms4G -XX:+UseG1GC -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
103+
```
104+
105+
______________________________
106+
There are many opinions on what's considered good or not-so-good to use for JVM args that change from person-to-person, and over time. The settings above were based on [this great discussion/explanation](https://www.reddit.com/r/feedthebeast/comments/5jhuk9/modded_mc_and_memory_usage_a_history_with_a/) by CPW, the lead dev of EnderIO and a prominent contributor to the Forge project.
107+
108+
109+
110+
<br>
111+
112+
<br>
113+
114+
<br>
115+
116+
117+
# Background Story
118+
Mojang's [Minecraft EULA](https://account.mojang.com/documents/minecraft_eula) is extremely open and forgiving, going so far as to "encourage you to do cool stuff." One of the very few explicit restrictions and "the one major rule" prohibits re-distributing Minecraft or any part of it (including the Minecraft server binary files):
119+
> "In order to ensure the integrity of the Game, we need all Game downloads and updates to come from an authorized source. It's also important for us that 3rd party tools/services don't seem "official" as we can't guarantee their quality. It's part of the responsibility we have to the customers of Minecraft."
120+
121+
This means that any modpack team/developer that wants to provide users with a *ready-to-use* server file package can't provide all the binaries and therefore would be incomplete. This script bridges that gap by dynamically fetching and installing MinecraftForge. The forge installer conveniently fetches the Minecraft binaries from Mojang's servers as well as the required library files as well providing a seamless "install" step followed by launching/running the server after initial setup.
122+
123+
From there we decided we wanted to go all-out providing as many features and configuration options as possible to make setting up and running a server as easy as possible. We want this to be more than just a simple "workaround" to the distribution restriction, but a full-featured option for server operators that don't use a control panel or management software.
124+
125+
126+
127+
128+
129+
130+
_____________________
131+
132+
<br>
133+
134+
<br>
135+
136+
<br>
137+
138+
139+
# Custom License
140+
The *only* reason we included a license is because we wanted it to be **easier** for more people to use/share this. Some places (i.e. Curse) need some form of "official" notice allowing content to be used. Since we were making a license anyway, we thought it would be nice to add an attribution clause so others didn't try to claim our work as their own. The result is this custom license based on a combination of the [MIT license](https://opensource.org/licenses/MIT) and a couple parts from Vaskii's [Botania](http://botaniamod.net/license.php)/[Psi](http://psi.vazkii.us/license.php) license:
141+
```
142+
Copyright (c) 2017 All The Mods Team
143+
144+
Permission is hereby granted, free of charge, to any person obtaining a copy
145+
of this software and associated documentation files (the "Software"), to deal
146+
in the Software without restriction, including without limitation the rights
147+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
148+
copies of the Software, and to permit persons to whom the Software is
149+
furnished to do so, subject to the following conditions:
150+
151+
You must give appropriate credit to the "All The Mods Team" as original
152+
creators for any parts of this Software being used. A link back to original
153+
content is optional but would be greatly appreciated.
154+
155+
It is forbidden to charge for access to the distribution of this Software or
156+
gain money through it. This includes any type of inline advertisement, such
157+
as url shorteners (adf.ly or otherwise) or ads. This also includes
158+
restricting any amount of access behind a paywall. Special permission is
159+
given to allow this Software to be bundled or distributed with projects on
160+
Curse.com, CurseForge.com or their related sub-domains and subsidiaries.
161+
162+
Derivative works must be open source (have its source visible and allow for
163+
redistribution and modification).
164+
165+
The above copyright notice and conditions must be included in all copies or
166+
substantial portions of the Software, including derivative works and
167+
re-licensing thereof.
168+
```
169+
170+
____________________________
171+
## DISCLAIMERS
172+
173+
"All The Mods Team" is not affiliated with "Mojang," "Oracle," "Curse," "Twitch," "Sponge," "Forge" or any other entity (or entity owning a referenced product) potentially mentioned in this document or relevant source code for this Software. The use of their names and/or trademarks is strictly circumstantial and assumed fair-use. All credit for their respective works, software, branding, copyrights and/or trademarks belongs entirely to them as original owners/licensers.
174+
175+
```
176+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
177+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
178+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
179+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
180+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
181+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
182+
SOFTWARE.
183+
```
184+
185+
186+
_______________________________
187+
188+
189+
<br>
190+
<br>
191+
<br>
192+
<br>
193+
<p align="center">
194+
<img src="https://i1.wp.com/allthepacks.com/wp-content/uploads/2017/01/Abyus4d.png" alt="All The Mods" width="400" height="400">
195+
</p>
196+
<br>
197+

0 commit comments

Comments
 (0)