You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mscs/adjusting-world-server-properties/forge.md
+35-20Lines changed: 35 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,21 @@ is the name of your world.
100
100
## Forge 1.17.1 and later
101
101
Please note that forge for Minecraft 1.17.1 will be used in the examples. If you named the server directory `forge-1.17.1` in the first step with the `mkdir` command, the installer should install a bash script to `/opt/mscs/server/forge-1.17.1` and a bunch of library files in `/opt/mscs/server/forge-1.17.1/libraries/`.
102
102
103
-
In the `/opt/mscs/server/forge-1.17.1 directory`, edit `run.sh`.
103
+
### Automatic
104
+
105
+
In the `/opt/mscs/server/forge-1.17.1` directory, execute these commands:
106
+
107
+
```bash
108
+
sed -i "\|@[^\"]|s|@|@$(pwd)/|" run.sh
109
+
sed -i "s|\"\$@|--nogui &|g" run.sh
110
+
sed -i "s|libraries|$(pwd)/libraries|g" libraries/net/minecraftforge/forge/*/unix_args.txt
111
+
```
112
+
113
+
Continue below at **<ahref="#end-manual">You may also want...</a>**
114
+
115
+
### Manual
116
+
117
+
In the `/opt/mscs/server/forge-1.17.1` directory, edit `run.sh`.
104
118
105
119
(GNU nano is an easy to use command-line text editor if you plan to edit the file from the terminal. Install it with `sudo apt install nano` if you are using a Debian based distro. In the following instructions, to edit a file with GNU nano, replace `editor` with `nano`.)
106
120
@@ -122,6 +136,25 @@ The `@user_jvm_args.txt` and the `@libraries/net/minecraftforge/forge/1.17.1-37.
Now the `unix_args.txt` file mentioned in `run.sh` needs to be edited as well to include the full directory paths. Change the directory to the one containing the `unix_args.txt` file, create a backup in case you mess up the editing, and then edit the original.
140
+
141
+
```bash
142
+
cd /opt/mscs/server/forge-1.17.1/libraries/net/minecraftforge/forge/1.17.1-37.1.1/
143
+
cp unix_args.txt unix_args_backup.txt
144
+
editor unix_args.txt
145
+
```
146
+
147
+
Every path that includes `libraries/[...]` has to be replaced with their full directory path: `/opt/mscs/server/forge-1.17.1/libraries/[...]`. If your editor of choice is GNU nano, this can be done by pressing `<Ctrl-\>`, typing `libraries` and pressing enter, then typing the full path name. In this case it would be `/opt/mscs/server/forge-1.17.1/libraries`, then press enter, then press `<a>` to replace all.
148
+
149
+
If you mess this up, you can always delete the `unix_args.txt` file and make another one using the backup, and start editing again.
150
+
151
+
```bash
152
+
rm unix_args.txt
153
+
cp unix_args_backup.txt unix_args.txt
154
+
editor unix_args.txt
155
+
```
156
+
<aid="end-manual"></a>
157
+
125
158
You may also want to increase the initial RAM and possibly even the maximum RAM. To do this, edit the `user_jvm_args.txt` file.
126
159
127
160
```bash
@@ -143,24 +176,6 @@ Now add all the java arguments you wish. For example, to allocate a minimum of 4
143
176
-Xms4G -Xmx6G
144
177
```
145
178
146
-
Now the `unix_args.txt` file mentioned in `run.sh` needs to be edited as well to include the full directory paths. Change the directory to the one containing the `unix_args.txt` file, create a backup in case you mess up the editing, and then edit the original.
147
-
148
-
```bash
149
-
cd /opt/mscs/server/forge-1.17.1/libraries/net/minecraftforge/forge/1.17.1-37.1.1/
150
-
cp unix_args.txt unix_args_backup.txt
151
-
editor unix_args.txt
152
-
```
153
-
154
-
Every path that includes `libraries/[...]` has to be replaced with their full directory path: `/opt/mscs/server/forge-1.17.1/libraries/[...]`. If your editor of choice is GNU nano, this can be done by pressing `<Ctrl-\>`, typing `libraries` and pressing enter, then typing the full path name. In this case it would be `/opt/mscs/server/forge-1.17.1/libraries`, then press enter, then press `<a>` to replace all.
155
-
156
-
If you mess this up, you can always delete the `unix_args.txt` file and make another one using the backup, and start editing again.
0 commit comments