Updating MinecraftTools to support the latest version of Minecraft
As part of our Year 7 and 8 Code Cadets programme at Canberra Grammar School we do Minecraft mod programming. There’s a fantastic book which has been published by No Starch Press titled Learn to Program with Minecraftby Craig Richardson. This teaches programming in Python through developing Minecraft mods.
In order to program mods the student needs to run up a local Minecraft server on their computer. Unfortunately, the copy of the downloadable tools from the No Starch Press website have not been updated since March 2016 and only support a fairly old version of Minecraft.
As we wanted to use the latest and greatest version of Minecraft with our students we updated the tools. It was a reasonably straight-forward process, and we wanted to share the process here in case others would like to do the same (there are quite a few reviews on Amazon about this exact topic).
Updating Minecraft Tools
- Download MinecraftTools from the No Starch Press website, as per the instructions in the book: https://www.nostarch.com/programwithminecraft . Once downloaded, extract the archive and you should be presented with a folder named
MinecraftToolswhich contains all the files.
- Download the latest version of the Spigot BuildTools from the Spigot Jenkins page: https://hub.spigotmc.org/jenkins/job/BuildTools . You should download the “Latest stable build”. This should download a file called
- You’ll now need to extract the contents of the
BuildTools.jarfile as we need all the files inside it.
- Put the
BuildTools.jarfile inside its own folder called
- Open a text editor (preferably something other than TextEdit, like Sublime Text, Atom,
vim, etc.) and put the following into the file:
cd “$(dirname “$0”)”
exec java -Xms1G -Xmx1G -jar BuildTools.jar nogui
This is a Bash script which will extract the
BuildTools.jar file and put its contents into the folder where the
BuildTools.jar is located.
- Save the file as
extract.commandin the same folder as the
- You now need to grant the file execution rights. Open a Terminal window, type
chmod a+xwith a trailing space, and then drag the
extract.commandfile into the Terminal (which will put the path of the file after that command). Press
extract.commandnow has execution rights.
- Double-click to run the
extract.commandfile and it will commence extracting the
BuildTools.jarfile. This will take around 5–10 minutes and does require internet access so packages can be downloaded.
- Once the script has finished extracting everything from the
BuildTools.jarfile, go into the
MinecraftToolsfolder (which you downloaded from the No Starch Press website) and open the
serversub-folder. Delete any files and folders which are present in the extracted
BuildTools.jarfolder. This is usually:
spigot.jar(delete this even though it’s not in the
BuildToolsfolder…you’ll see why shortly), and
- Copy all the files from the
BuildToolsfolder (with the exception of
extract.command) into the
MinecraftToolsfolder (essentially replacing the deleted files with these new copies).
- Rename the
spigot-X.X.X.jarfile (which should match the latest version of Minecraft) to
Hope this has helped others who are getting into Minecraft mod programming!
Thank you to Craig Richardson and No Starch Press for publishing this fantastic book.
Thanks to joshwenke for his instructions at https://www.spigotmc.org/wiki/bbcode.2703/archive about how to extract the files from the Spigot
.jar file, which the instructions above are heavily based upon.