Updating CraftBook to Minecraft 1.13

Posted on November 18, 2018 in minecraft

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 (under the 3.x branch). 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 codebases 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.

The next article in this series will be on WorldEdit again, this time going over a few of the changes in WorldEdit 7 that have been made since the last post, as well as a look at future changes in the pipeline.

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 😁

Share this with others!
Post Tags

Other Posts

Introducing WorldEditCLI and WorldEdit Golf

Posted on September 29, 2019

A typical task that people want to achieve with WorldEdit is to load in a schematic, replace a few blocks, and then save it again. With WorldEditCLI, this couldn't be easier!

Introducing WorldEdit 7: What's New?

Posted on June 11, 2019

After over a year in the making, WorldEdit 7 is complete. This is a major update with hundreds of brand new features, find out more here!

Updating WorldEdit to Minecraft 1.13

Posted on August 03, 2018

Updating WorldEdit to Minecraft 1.13 has been a long and arduous process. Find out what's changed!