Interface with FeedTheBeast (FTB)
Roflicide opened this issue · comments
Do we know if MSCS will work/ we can make it work with FeedTheBeast, a modpack based on Forge? It's a little different than other server mods because it doesn't just download a generic JAR that installs the server software automatically (like Spigot or Forge). Instead, since there's a billion different modpacks for FTB, you have to choose which one you want to download. After you choose which server modpack to download, it will give you a folder full of files, such as the following:
As you can see, FTB shares some common folders with Forge (since it's built on forge), such as the mods
folder and the libraries
folder. But, there are also a bunch of other folders that are completely different.
Any idea of how we would go about doing this?
I wrote a wiki page once on making MSCS work with Forge
https://github.com/MinecraftServerControl/mscs/wiki/Server-Customization-Examples#forge
My guess is that the server executable is FTBServer-1.7.10-1558.jar
Open ServerStart.sh
with a text editor and see if there are any special commands in there.
@zanix Hey, hope you're doing well.
Initially, I was following your wiki page entry but I ran into issues. If I dragged the FTBServer-1.7.10-1558.jar
outside of the folder into the location noted on the wiki (/opt/mscs/server
/) and tried to install it then it would give me a libraries not found error (because the libraries weren't there). I didn't want to drag those libraries into that folder because then the libraries
and mods
folder would overwrite the already existing folders in /opt/mscs/server/
. If I ran the jar inside of its own folder (that has all the libraries included) it would just install everything within the folder, not to the /opt/mscs/server/
folder or to the /opt/mscs/libraries
folder, which is what it is supposed to do.
Here is what the ServerStart.sh
contains:
#!/bin/sh
cd "$(dirname "$0")"
. ./settings.sh
# makes things easier if script needs debugging
if [ x$FTB_VERBOSE = xyes ]; then
set -x
fi
# cleaner code
eula_false() {
grep -q 'eula=false' eula.txt
return $?
}
start_server() {
"$JAVACMD" -server -Xms512M -Xmx2048M -XX:PermSize=256M -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -jar FTBServer-1.7.10-1558.jar nogui
}
# run install script if MC server or launchwrapper s missing
if [ ! -f $JARFILE -o ! -f libraries/$LAUNCHWRAPPER ]; then
echo "Missing required jars. Running install script!"
sh ./FTBInstall.sh
fi
# check if there is eula.txt and if it has correct content
if [ -f eula.txt ] && eula_false ; then
echo "Make sure to read eula.txt before playing!"
echo "To exit press <enter>"
read ignored
exit
fi
# inform user if eula.txt not found
if [ ! -f eula.txt ]; then
echo "Missing eula.txt. Startup will fail and eula.txt will be created"
echo "Make sure to read eula.txt before playing!"
echo "To continue press <enter>"
read ignored
fi
echo "Starting server"
rm -f autostart.stamp
start_server
while [ -e autostart.stamp ] ; do
rm -f autostart.stamp
echo "If you want to completely stop the server process now, press Ctrl+C before the time is up!"
for i in 5 4 3 2 1; do
echo "Restarting server in $i"
sleep 1
done
echo "Rebooting now!"
start_server
echo "Server process finished"
done
So am I correct in assuming the files you get here are not the Forge installer?
In that case you should be able to copy only the server jar to /opt/mscs/server
and configure the mscs-server-jar
option. Leave the rest of the files in the world directory. Then the mscs script should run the server jar from a working path in /opt/mscs/worlds/<name>
.
@zanix Yes, that's correct.
Just did what you said above--it sounds right, though I'm getting a couldn't retrieve the server's process ID
error, probably because I'm running Java 8 for one of my servers which is 1.12.1 whereas the FTB version I'm on is on 1.7.10. I guess i need to install Java 7 and then find a way to specify the Java Path for each of them
Edit: I just tried running the server without trying to interface it with MSCS, and it worked (using Java 8). So there must be some other issue going on.
I don't recall if mscs will continue running the server when that error occurs.
@zanix is right.
- Create the world with
mscs create <name> <port>
. - Add
mscs-server-jar=FTBServer-1.7.10-1558.jar
to the world'smscs.properties
file. - Move
FTBServer-1.7.10-1558.jar
to the/opt/mscs/server/
folder. - Move the
libraries
folder to the/opt/mscs/server/
folder. - Move the folders containing the FTB requirements (e.g.,
config
,mods
, etc) to the/opt/mscs/worlds/<name>/
folder, or simply install FTB to that location to begin with (the three sets of.sh
and.bat
files are not needed and can be deleted).
Once this is done, post the contents of the world's console.out
file after trying to start the world.
@Roflicide, once you get it working, would you mind updating the wiki or adding a FTB specific section to fix the pain-points you found?
@Roflicide, once you get it working, would you mind updating the wiki or adding a FTB specific section
to fix the pain-points you found?
@sandain Sure
Still getting the same issue as before when following the steps above--class not found error, even though I've moved all the files to opt/mscs/worlds/<name>/
folder. I've also tried running FTBInstall.sh
as well in that folder, but all it does is download the minecraft 1.7.10 jar.
console.out:
Exception in thread "main" java.lang.NoClassDefFoundError: joptsimple/OptionSpec
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at cpw.mods.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:25)
at cpw.mods.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:12)
Caused by: java.lang.ClassNotFoundException: joptsimple.OptionSpec
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 4 more
Here is my mscs.properties
:
mscs-enabled=true
mscs-server-jar=FTBServer-1.7.10-1558.jar
mscs-server-version=1.7.10
mscs-client-version=1.7.10
Here is what the folder of my ftb world (/opt/mscs/worlds/ftb/
) looks like:
Here is what my /opt/mscs/server/
folder looks like (Notice the FTB jar in there..):
So, I think I'm doing everything right
You have a lot of files/directories owned by root
, this may just be a permission problem. Try:
chown -R minecraft:minecraft /opt/mscs
You have a lot of files/directories owned by root, this may just be a permission problem. Try:
chown -R minecraft:minecraft /opt/mscs
Still getting the same error and the same console.out
even after doing chown -R minecraft:minecraft /opt/mscs
. :(
Here's the updated directory listings, just for information purposes:
/opt/mscs/server/
/opt/mscs/worlds/ftb/
I think that I got it working. Here is how I did it.
First, I created the world:
mscs create ftb 25570
Then I switched users so that I wouldn't have permission issues:
sudo su -s /bin/bash minecraft
Note: permission issues could just as easily have been worked around with chmod
after files were copied from my normal user account.
Next, I downloaded and installed FTB using the Vanilla Plus Server pack:
cd /opt/mscs/worlds/ftb
wget ftb.cursecdn.com/FTB2/modpacks/FTBVanillaPlus/1_0_0/FTBVanillaPlusServer.zip
unzip FTBVanillaPlusServer.zip
sh FTBInstall.sh
Then, I moved a few of the downloaded files to the server folder:
mv FTBServer-1.7.10-1448.jar /opt/mscs/server/
mv minecraft_server.1.7.10.jar /opt/mscs/server/
mv libraries /opt/mscs/server/
Next, I configured various MSCS settings with editor mscs.properties
:
mscs-enabled=true
mscs-server-jar=FTBServer-1.7.10-1448.jar
mscs-server-url=
mscs-server-version=1.7.10
mscs-client-version=1.7.10
I then read and modified the EULA with editor eula.txt
.
Then I started the server:
mscs start ftb
And finally I did a little cleanup:
rm FTBVanillaPlusServer.zip FTBInstall.bat FTBInstall.sh ServerStart.bat ServerStart.sh
I don't have the Minecraft client installed on my current computer so I can't actually log in to test that it works, but it appears to be:
$ mscs status
Minecraft Server Status:
ftb: running version 1.7.10 (0 of 20 users online).
Process ID: 7597.
Memory used: 355684 kB.
Here is my current directory listing for /opt/mscs/server/
:
$ ls -la /opt/mscs/server/
total 131500
drwxr-x--- 3 minecraft minecraft 4096 Sep 19 12:59 .
drwxr-xr-x 15 minecraft minecraft 4096 Sep 19 12:51 ..
-rw-r--r-- 1 minecraft minecraft 10123377 Sep 18 16:06 BungeeCord.jar
-rw-rw-r-- 1 minecraft minecraft 2940503 Sep 19 13:02 FTBServer-1.7.10-1448.jar
drwxrwxr-x 6 minecraft minecraft 4096 Sep 19 13:03 libraries
-rw-r--r-- 1 minecraft minecraft 9720835 Jan 20 2017 minecraft_server.1.11.2.jar
-rw-r--r-- 1 minecraft minecraft 9713666 Nov 14 2016 minecraft_server.1.11.jar
-rw-r--r-- 1 minecraft minecraft 30221337 Aug 3 06:53 minecraft_server.1.12.1.jar
-rw-rw-r-- 1 minecraft minecraft 30222121 Sep 18 03:24 minecraft_server.1.12.2.jar
-rw-r--r-- 1 minecraft minecraft 30202458 Jun 7 05:53 minecraft_server.1.12.jar
-rw-r--r-- 1 minecraft minecraft 1801710 May 3 07:47 minecraft_server.1.3.2.jar
-rw-rw-r-- 1 minecraft minecraft 9605030 Sep 19 13:02 minecraft_server.1.7.10.jar
-rw-r--r-- 1 minecraft minecraft 25337 May 30 2016 version_manifest.json
-rw-r--r-- 1 minecraft minecraft 25337 May 30 2016 version_manifest.json.bak
And the FTB world folder /opt/mscs/worlds/ftb
:
$ ls -la /opt/mscs/worlds/ftb/
total 140
drwxrwxr-x 8 minecraft minecraft 4096 Sep 19 13:07 .
drwxr-x--- 9 minecraft minecraft 4096 Sep 19 13:07 ..
drwxrwxr-x 3 minecraft minecraft 4096 Sep 19 13:05 asm
-rw-rw-r-- 1 minecraft minecraft 2 Sep 19 13:07 banned-ips.json
-rw-rw-r-- 1 minecraft minecraft 2 Sep 19 13:07 banned-players.json
drwxrwxr-x 13 minecraft minecraft 4096 Sep 19 13:02 config
-rw-rw-r-- 1 minecraft minecraft 0 Sep 19 13:07 console.in
-rw-rw-r-- 1 minecraft minecraft 57252 Sep 19 13:07 console.out
-rw-rw-r-- 1 minecraft minecraft 183 Sep 19 13:04 eula.txt
drwxrwxr-x 10 minecraft minecraft 4096 Sep 19 13:09 ftb
drwxrwxr-x 2 minecraft minecraft 4096 Sep 19 13:07 logs
-rw-rw-r-- 1 minecraft minecraft 7344 Sep 19 13:07 minetweaker.log
drwxrwxr-x 4 minecraft minecraft 4096 Sep 19 13:02 mods
-rw-rw-r-- 1 minecraft minecraft 132 Sep 19 13:04 mscs.properties
-rw-rw-r-- 1 minecraft minecraft 2 Sep 19 13:07 ops.json
-rw-rw-r-- 1 minecraft minecraft 11 Sep 19 13:07 query.in
-rw-rw-r-- 1 minecraft minecraft 13 Sep 19 13:07 query.out
drwxrwxr-x 2 minecraft minecraft 4096 Sep 19 13:02 scripts
-rw-rw-r-- 1 minecraft minecraft 645 Sep 19 13:07 server.properties
-rw-rw-r-- 1 minecraft minecraft 2 Sep 19 13:07 usercache.json
-rw-rw-r-- 1 minecraft minecraft 120 Jun 25 2015 version.json
-rw-rw-r-- 1 minecraft minecraft 2 Sep 19 13:05 whitelist.json
Thanks for taking the time to test this out. The part that I'm unsure on is:
mv libraries /opt/mscs/server/
Because I already have a libraries
folder in /opt/mscs/server
that exists from another forge server installation (that I want to keep). I'm afraid that if I move it, it will overwrite that one and then my other server will be messed up. How do you think I should proceed?
As far as I know the libraries should be versioned and the forge server should only use the specific libraries it needs.
I would take a backup of your libraries directory and attempt to merge.
I agree with @zanix, you should be safe to merge the libraries together.
👏
I propose the strategy of creating folders for FTB versions --> one folder for a forge version with its own libraries (don't mind the extra space), which does not require any merges. Thats at least what I do which works flawless for me with multiple FTB versions.
@conrad784: There should be zero issue with merging the libraries together since they are version controlled. However, one could slightly modify the method I posted above to avoid possible issues by making the mscs.properties
file looks like:
mscs-enabled=true
mscs-server-location=/opt/mscs/server/FTBVanillaPlus/1_0_0
mscs-server-jar=FTBServer-1.7.10-1448.jar
mscs-server-url=
mscs-server-version=1.7.10
mscs-client-version=1.7.10
and moving the following extracted files to that folder:
mkdir -p /opt/mscs/server/FTBVanillaPlus/1_0_0/
mv FTBServer-1.7.10-1448.jar /opt/mscs/server/FTBVanillaPlus/1_0_0/
mv minecraft_server.1.7.10.jar /opt/mscs/server/FTBVanillaPlus/1_0_0/
mv libraries /opt/mscs/server/FTBVanillaPlus/1_0_0/
Or, one could even leave the FTB server files in the world directory with something like this for a world named ftb
:
mscs-enabled=true
mscs-server-location=/opt/mscs/worlds/ftb
mscs-server-jar=FTBServer-1.7.10-1448.jar
mscs-server-url=
mscs-server-version=1.7.10
mscs-client-version=1.7.10
No need to move files once downloaded that way.