Minecraft FTB Server – Ubuntu 14.04 Setup

A follow-up to my last post about Feed The Beast (FTB) and my own setup, which consists of:

  • OSX as a client
  • Ubuntu 14.04 as a server

The steps to get up and running are super simple. One thing to note, however. This is on a personal VM that I host at my house and it won’t be accessible to people outside my home network, so I don’t have a big need for strict security. If I did, my steps for getting up and running would be much more stringent.

Once we have our Ubuntu 14.04 VM image up and running, we will login as our non-privileged user and issue the following command to do some initial updating:

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get autoclean

Next, I run the following to get some essential utilities if they don’t already exist (open-vm-tools, since this is a VM. Also wget and unzip) as well as the openjdk version 8 JRE package, since running the client required running Java 8.

sudo apt-get install openjdk-8-jre open-vm-tools wget unzip

Now I am going to modify the unattended upgrades file so that I can keep the Ubuntu server fairly up to date without manual intervention.

sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

Now I am going to download the Feed The Beast server files from the official site into our home folder.

wget https://media.forgecdn.net/files/2702/368/FTBUltimateReloadedServer_1.6.0.zip

mv FTBUltimateReloadedServer_1.6.0.zip feedthebeast/

unzip FTBUltimateReloadedServer_1.6.0.zip

Now go into the new folder and do the following:

chmod +x ServerStart.sh

./ServerStart.sh

The server will start and complain about an EULA not being acknowledged. Control + C to cancel the server start and…

nano eula.txt

Set to true, and re-run ServerStart.sh- one thing to notice is that the server lives and runs in the scope of the current window only. Once you close your connection the server dies. We can use screen to fix this.

screen -S ftb_server 
./ServerStart.sh
  • Detach screen: Control+A and d
  • See screen sessions: screen -ls
  • Re-attach to last screen: screen -r

I wanted to play a flat world with more layers, so I changed world mode to flat, used the Minecraft 101 Superflat Preset Generator site to generate a new world, SFTP’ed it into my server and replaced the current world and then passed the following commands to prevent mobs from spawning:

/difficulty peaceful
/gamerule doMobSpawning false

Minecraft FTB Client – OSX Java Issue

So the other day I had a pretty big hankering to play some Minecraft. I downloaded Feed the Beast (FTB) and a modpack I liked that reminded me of what I used to play on Tekkit. Go to launch, and…. problems. The client wouldn’t work.

feed the beast Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader

What I realized is that there was a problem with Java on OSX- in this case, it was too new to properly launch FTB. Rather than downgrading my Java version, which isn’t good for obvious reasons, I decided to download a standalone older version and then point the FTB launcher to it.

In this case, downloading Java SE Runtime Environment 8u212 did the trick. We are looking for the .tar.gz file and not the .dmg, which will open the full GUI automated installer. Once downloaded, unzip or un tar the tar.gz file.

Now we need to locate the Java bin file. In my case, it was located inside the unzipped tar.gz file here:

jre1.8.0_212.jre > Contents > Home > bin > java

Open the FTB client. Under the profile selector, click on “Edit Profile.” Under Java Settings (Advanced), check the “Executable” box and use the location of the Java bin file we just downloaded and found in the last step.

/Users/<username>/Downloads/jre1.8.0_212.jre/Contents/Home/bin/java

Make sure both the “Executable” and the “JVM Arguments” boxes are checked. Hit “Save Profile” and you should be good to go!