Installing a Local Minecraft Server for Modding with Scriptcraft

A local Minecraft server is one running on the same computer on which you’re playing Minecraft.

I do not support setting up a local server during live workshops as it has too many possible ways to go wrong (due to so many possible hardware/software combos among the users) and takes up too much time. It is requested you try to handle this on your own, or most workshops have a pre-workshop period where set-up help is provided.

The advantages of it are little to no network lag, no monthly fees, and a lower likelihood that someone will hack your server.

The downsides are that it’ll be slow if your computer’s not good enough, it’s harder to open it up to your friends so they can try your mods, and you can run into driver incompatibilities that make it plain impossible.

Important Legal Information

I’m providing a pre-configured server to go with the Minecraft modding lessons I provide. By downloading it and installing it, you agree to the EULA. Furthermore, you agree that you download and use this at your own risk without any guarantees, and that you hold me and any related parties harmless in the event that anything goes wrong with your downloading or use of this software.

Let’s get Started

To follow these lessons, you will need:

  • Minecraft for PC/Mac
    This requires a Mojang.net account and a license.
  • Oracle’s Java JRE (Java Runtime Engine)
    Do not use OpenJDK. While a lovely project, many forum posts have said that it does not play nicely with the Minecraft server we need to use.
  • Notepad++ (Win), TextWrangler (Mac), or Geany (Linux & Win)
    Using Windows style (CRLF) line endings in your code and especially the config files, can cause all sorts of errors, so DO NOT USE WINDOWS NOTEPAD. These editors can handle Unix style (LF) line endings

Setting Up Your Software

These should go in this order…

Get Minecraft:

If you don’t have a working version of Minecraft for PC/Mac, get one. You might need to follow the instructions to set-up/update Java before it works.

Please note that if you have Minecraft Pocket Edition or for the XBox or PlayStation, you’ll have to buy a new license for the PC/Mac version. The recent Minecraft for Windows 10 release does not work with this.

Setting up Java:

First thing to do is check your Java Version. Open a terminal in Mac or Linux, (or in Windows use Windows-Key + R, then type cmd and Enter).

Type java -version.

Windows DOS prompt showing the 'java -version' command and results

It’s best to have the latest version, but anything at 1.8.0_25 or higher should be good enough. If you don’t have a “1.X.X_XX” format, you may have Open JDK. If you get an error, you may not have Java installed. For Windows or Mac, go to the Oracle Site to get the latest. For Linux, it depends on your distribution, but here’s help updating Ubuntu.

Setting up Your Editor:

To set up Notepad++ for Unix line endings, follow these two steps.

1: From the Edit menu, select “EOL Conversion”. The selected format will be grayed out. If it is not “UNIX/OSX Format,” select that.
Notepad++ File Menu - Line Endings Setting

2: From the Settings menu, select “Preferences”. In the Preferences window, select “New Document” and then the “Unix/OSX” option in the “Format (Line ending)” box.
Notepad++. Preferences window, New Documents, selecting a formatting option.

TextWrangler and Geany appear to default to Linux/OSX line endings.

Setting up Your Server:

To make life easy, I’ve preconfigured the CanaryMod server for you with a customized superflat world that has plenty of room to dig, underground mines to explore, plus large flat expanses. It has Scriptcraft installed, is in creative mode, and is ready for you to play after you add yourself to the operators list and white list. Please see the EULA notice if you skipped it on your way down here.

Click here to download a pre-configured CanaryMod-1.2.1 with Scriptcraft

Download the file linked above to whatever directory on your server you want it to live in (avoid the Program Files directory if you’re in Windows) and unzip/extract it.

Starting your server

Open a terminal in your OS. For OSX and Linux-based systems, you’ll have a terminal program handy. For Windows, in Windows Explorer, find the folder where your server files are, hold down shift while you right-click on it, and you’ll get an “Open command window here” option. Choose it.

Demo of right-clicking a folder to expose Open command window here command

If you’ve properly updated your copy of Java, you should now be able to launch your server from a terminal window where you’ve navigated to your server directory.

java -jar Canarymod-1.2.1.jar

IMPORTANT: GIVE YOURSELF PERMISSION TO PLAY

First, your username is shown when you first launch Minecraft (the screen that comes up with announcements before you click the play button). It’s down in the lower right…

Your minecraft username

That name in bold after “Welcome” is the username you need to use below.

In the terminal where you have the server running, it will have a prompt “>” for issuing commands to the server. In the following commands, replace [your name] with your Minecraft username. Give the server some time to boot before you do these. You’ll only need to do them once with your server.

whitelist add [your name]

op [your name]

ISSUE IN CANARYMOD 1.2.1: USERNAME IS NOT RESOLVED

When you try to whitelist or op yourself, you may get an error like this…

unresolved username screencap

If you try to logon to the server, you get something like this…

Whitelist error screencap

You’re going to need to use your UUID instead of your username. To get your UUID, try MCUUID.net. Enter your username, click “convert” and it will provide your UUID.

screencap of mcuuid.net

Copy your UUID from the site and try those op and whitelist commands again, but with your UUID instead of your Minecraft username.

Connecting to your server

Start Minecraft.
Select Multiplayer mode.
Add a Server with the address 127.0.0.1 (only need to do this once)
Connect to that server.

You’re now playing on your local server.

Go to Minecraft Modding Menu

 


Disclaimer: I am not a legal representative or associate of Mojang, CanaryMod, Oracle, or Walter Higgins (author of Scriptcraft). None of this content should be construed to be approved, endorsed, or sponsored by any of them in any way. Minecraft is a trademark of Mojang AB, Java is a trademark of Oracle, and I’m just a guy who likes helping people learn.

Leave a Reply

Your email address will not be published. Required fields are marked *

*