Updating CraftBook to Minecraft 1.13

Posted on November 18, 2018 in minecraft

Tagged with: craftbook

This article is the fourth in a series of articles, links to the others are found here: First, Second, Third

This post has been a long time coming, seeing as the last post in the series was just over three months ago.

CraftBook has been somewhat neglected since progress towards 1.13 started, mostly due to the smaller user base compared to WorldEdit and WorldGuard. In saying this, CraftBook is still my main priority out of all plugins I develop.

Challenges of 1.13

1.13 poses a few interesting challenges for CraftBook. The biggest of which is items and blocks on signs. This idea is used throughout the plugin and underpins many of the main features.

The main annoyance regarding this issue, is I fixed it back in 2014 with CraftBook 4. CraftBook 4 never requires entering items or blocks on signs; however, it depends on a feature that is not realistically possible with Spigot.

For now, the current solution has been to allow legacy IDs for existing blocks and use 'minified' (without the minecraft namespace) string IDs for new blocks. In the few cases where they're still unable to fit on signs, CraftBook's Variables feature allows for it to still function. This recommendation is a temporary solution.

Another major issue that has been encountered is the instability and bugginess of the Spigot API. Upon first updating the plugin, over half didn't work purely due to Spigot not correctly handling API calls and events. Even now, I'll find issues that are caused by a new bug in Spigot.

CraftBook uses almost all of the Spigot API, making it one of the most significant plugins for encountering bugs. Due to this, I quite frequently run into very niche issues, some that have existed for years.

Having to make such significant changes to the plugin meant this was also a perfect time to modernise the plugin. The build system has switched to Gradle, meaning builds are once again available on builds.enginehub.org. Old deprecated usages of the WorldEdit API were removed, and a few other minor changes have been made to ensure the plugin has a modern codebase.

Now and the Future

Currently, CraftBook 3 is in a mostly working state. I'm fixing issues as they crop up, and improving the plugin as usual. There will have to be some changes made in the future to ensure that CraftBook continues being a performant, stable, and versatile plugin.

Plans for the Future

My current plan is to build the WorldEdit API up to a point where CraftBook can be built on top of it. This is quite an enormous task, so it won't be happening in the short term.

The goal here would be for a thin platform layer to sit between Spigot and CraftBook, meaning there is much less code that can be broken by Spigot bugs.

This is also where CraftBook 4 comes into it. Maintaining CraftBook for both Spigot and Sponge as two separate code bases was an awful idea. The intention here is to have CraftBook 5, compatible with both Sponge and Spigot, and based off the CraftBook 4 source. It's unclear how the Sponge-specific features will be replicated on Spigot at this stage.

For more information on CraftBook 5, check out this article!

I've devoted countless hours to working on this project. If you'd like to support me, I have a Patreon and accept donations through PayPal. Thanks 😁

Check out these popular related posts!

CraftBook 5 and the future of CraftBook

Posted on November 08, 2020

You may have heard mention of CraftBook 5. This post should give you all the information you need to understand what it is, why it exists, and what to expect.

An Ode to the Minecraft Community

Posted on July 10, 2018

My journey over 8 years with the Minecraft community. From The Powder Toy, to CraftBook, AntiCheat, Sponge, and WorldEdit.

Updating 3 of the largest Minecraft plugins in existence to 1.13

Posted on July 26, 2018

Over the past few months, I've taken on the task of updating WorldEdit, WorldGuard, and CraftBook to Minecraft 1.13.