Skip to content

Commit

Permalink
Update with latest blog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeeey committed May 13, 2024
1 parent 93cfd95 commit be8823e
Show file tree
Hide file tree
Showing 17 changed files with 305 additions and 1 deletion.
57 changes: 57 additions & 0 deletions blog/2024-05-02-geyser-1-20-5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: "Geyser Available for Java 1.20.5/1.20.6"
slug: "geyser-1-20-5"
authors: Camotoy
hide_table_of_contents: false
description: "Support for Java 1.20.5 and 1.20.6 has been released"
---

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](https://github.com/CloudburstMC/NBT), 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:

```java
boolean piglinSafe = ((Number) dimension.get("piglin_safe").getValue()).byteValue() != (byte) 0;
```

Changes to:

```java
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…

![Tag Enums](/img/blog/2024-05-02-geyser-1-20-5/tag-enums.png)

…would now be adding one line of a new enum in [the ItemTag class](https://github.com/GeyserMC/Geyser/blob/8b7b8cdffdb7aba97ef817037859d1151f4b2665/core/src/main/java/org/geysermc/geyser/session/cache/tags/ItemTag.java). And we had to add a handful of enums to add support for [data-driven animal loved foods](https://github.com/GeyserMC/Geyser/commit/59a2c0dc02abacd00fe3a72788cc9317c891557e)... 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!

![Trim Recipes](/img/blog/2024-05-02-geyser-1-20-5/trim-recipes.png)

## Entity properties

Bedrock’s newer [entity property system](https://learn.microsoft.com/en-us/minecraft/creator/documents/introductiontoentityproperties?view=minecraft-bedrock-stable) 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](https://github.com/Kas-tle) came through and [ported some work-in-progress code](https://github.com/GeyserMC/Geyser/commit/99e6a2981da27a9ec8f09c04cfc8e73a296e4263) 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](https://github.com/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](https://github.com/AJ-Ferguson) and [Chris](https://github.com/onebeastchris) both helped with implementing new features and fixing regressions.

[Kastle](https://github.com/Kas-tle), hot off the heels of stronger security protections on the Bedrock side, assisted with custom skull reimplementation and entity properties implementation.
241 changes: 241 additions & 0 deletions blog/2024-05-05-raknet-amplification-attack.md

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion blog/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ Camotoy:
name: Camotoy
title: Project Lead
url: https://github.com/Camotoy
image_url: https://github.com/Camotoy.png
image_url: https://github.com/Camotoy.png

Kas-tle:
name: Kas-tle
title: Developer
url: https://github.com/Kas-tle
image_url: https://github.com/Kas-tle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit be8823e

Please sign in to comment.