Geyser Available for Java 1.20.5/1.20.6
Support for Java 1.20.5 and 1.20.6 has been released. Thank you for your patience as we work on the update!
New: item components
Gone is the item NBT to serialize extra data over the network. 1.20.5 introduces data components, which replaces the guesswork of NBT with strict objects attached to each class.
We’ve also been able to get rid of unreachable code from before the server inventory rewrite, back when creative mode Bedrock had the potential ability to delete NBT from items just from moving them around.
NBT refactor
Since items no longer have NBT, we decided it was a good time to switch to using one NBT library. Our Bedrock protocol library used Cloudburst’s NBT implementation, whereas our Java protocol library used OpenNBT. The latter has been severely neglected, and still has several cases of weird or outdated implementations, such as tag names being present in tag value objects. The entire project now uses Cloudburst’s NBT library, which is far nicer to use overall:
boolean piglinSafe = ((Number) dimension.get("piglin_safe").getValue()).byteValue() != (byte) 0;
Changes to:
boolean piglinSafe = dimension.getBoolean("piglin_safe");
Better tag extensibility
Block and item tags are now enums - this example diff to add support for one tag…
…would now be adding one line of a new enum in the ItemTag class. And we had to add a handful of enums to add support for data-driven animal loved foods... imagine the complexity with the first style of code!
No more trim recipe hardcoding
Because the server now sends all trim recipes through a packet as a registry, we’re able to get rid of this block of code that was required for trim recipes to be handled. Yay to no hardcoding!
Entity properties
Bedrock’s newer entity property system has now found a use in vanilla Bedrock - it controls the armadillo’s animation state (and without it, an armadillo will default to staying inside its shell!). Kastle came through and ported some work-in-progress code so Geyser is able to work with the new system.
Special Thanks
This update would have been a nightmare without the many hands we had to help implement everything we needed to get done.
basaigh implemented the huge item changes in MCProtocolLib in a very timely fashion, meaning that Geyser could get right to updating its own code.
AJ Ferguson and Chris both helped with implementing new features and fixing regressions.
Kastle, hot off the heels of stronger security protections on the Bedrock side, assisted with custom skull reimplementation and entity properties implementation.