CraftBook 5 and the future of CraftBook
Posted on November 08, 2020 in minecraft
Tagged with: craftbook
If you've been vaguely following CraftBook's development for the past year, you may have heard mention of CraftBook 5. While it's not ready as of writing, this post should give you all the information you need to understand what it is, why it exists, and what to expect.
As you can probably guess, CraftBook 5 is the next major version of CraftBook. Unlike CraftBook 4, which was a total rewrite for Sponge, CraftBook 5 builds on the codebase of CraftBook 3 and therefore supports Bukkit-based servers.
CraftBook 5 is a series of system rewrites to make everything function better with modern Minecraft. These rewrites also include standardising various components throughout the plugin, so that everything interacts coherently and predictably. The way Minecraft functions as a whole has also changed significantly throughout the years. What was slow in the past is not what is slow now. Fundamental changes are occurring to the way the plugin operates to continue being one of the fastest plugins.
The mechanisms that CraftBook adds are also changing. Each mechanic is re-thought as the required systems get rewritten. In re-thinking the mechanics, we can best ensure that they fit within modern Minecraft, and work as well as they can for a majority of servers. Prior behaviour isn't going away, however, just improving.
Most of the major setbacks for CraftBook in the past few years have been bugs or limitations in Spigot. Due to this, CraftBook 5 is making heavy use of the WorldEdit API, as well as Paper. While this is not yet ultimately decided, either some mechanics or the entire plugin itself will require using Paper. Requiring Paper is not being done without a strong reason, as currently, allowing the plugin to work on Spigot is holding back performance for every user whether they use Paper or not. Part of this process also involves identifying workarounds for the Spigot issues we've encountered or submitting fixes to Spigot and Paper.
Using the WorldEdit API also provides more control over blocks and items. While there were limitations in what item data mechanisms like CommandItems could access in CraftBook 3 due to Spigot, anything can be accessed using the WorldEdit API.
In terms of actual changes you'll see as a user though, everything should feel more intuitive. For example, mechanisms are now manageable using the new
/cb mech in-game commands. These commands can enable, disable, and even provide a graphical management interface. The configuration of each separate mechanism has been simplified and split into individual files in the
mechanics folder of CraftBook.
In terms of sign-based mechanisms, we're shifting towards storing extra data on the block itself, rather than storing data as text on the signs. This change allows us to create more user-friendly methods of input, as well as to enable us to do more with each mechanic. For example, instead of complex syntax such as
12:3-54:2 on a line of an IC, we may have a text UI that allows setting various properties.
We're also borrowing a few features that made their way into CraftBook 4. For example, bridges and doors will intelligently determine the width you want them to be, rather than requiring it on the sign. We also plan to use inventory screens for item input in systems that make use of items to make everything more user friendly.
The jump to CraftBook 5 is for two main reasons.
Firstly, it would be odd to continue development of CraftBook 3 after CraftBook 4 had already existed. And CraftBook 4 did not make sense to port back to Spigot due to being very much written for Sponge. Also, an entire rewrite is far too much effort to spend on the project. It's better to spend time writing features that can release sooner, rather than spending extra time on something that won't necessarily make a tangible difference.
Secondly, the number of changes in here that potentially modify behaviour cause it to warrant a major version change. Calling this CraftBook 3.11 would not capture the scope of the change.
Overall, CraftBook 5 feels like the best option for the version name.
CraftBook 4 is officially discontinued. We're migrating the exclusive features of CraftBook 4 into CraftBook 5, but there's no further news regarding Sponge support. If in the future Sponge becomes a platform that warrants the effort, we'll consider adding Sponge support to CraftBook 5 alongside existing Bukkit support. This is not a promise and depends purely upon available time and whether there's enough of a Sponge userbase.
As was said before, you can expect CraftBook 5 to run better, be more user-friendly, support a lot of modern Minecraft features, and potentially require Paper.
Early alpha builds of CraftBook 5 are available for download from here, with documentation available here. The documentation only modifies areas that have been ported compared to CraftBook 3. CraftBook 5 currently will run alongside CraftBook 3 perfectly fine. However, this is likely to change when officially released. If using both plugins side by side, it's very important not to have the same mechanic enabled in both.
Currently, there is a spreadsheet that outlines the progress of porting each CraftBook feature over to CraftBook 5. It's worth noting, however, that the biggest roadblock for most of those mechanics are the internal systems on which they rely. When systems get ported, the mechanics that use them get ported as well.
There is no estimated time a full release will be available, as there are a few things that must happen first. If you'd like to chat about CraftBook 5 with me, or have any feedback or suggestions based on what you've read here, join the #craftbook channel in the EngineHub discord.
We work on CraftBook, as well as WorldEdit and WorldGuard, in our spare time. If you're able to contribute anything to our GitHub Sponsors that would be much appreciated.
Like this article? Why not share it with others!
Posted on December 03, 2018
A step-by-step guide on how to work with schematics and clipboards in the WorldEdit 7 API.
Posted on September 17, 2020
Running a Minecraft Server can be a daunting task. In this article you'll find answers to questions, guides for various systems, and advice on server administration.
Posted on August 03, 2018
Updating WorldEdit to Minecraft 1.13 has been a long and arduous process. Find out what's changed!