Geyser/core/src/main/java/org/geysermc/geyser/inventory/item
Amberichu 811aba3339
Validate written_book tags and fix writable book losing changes (#3894)
* Validate NBT tags of written_book like Java edition

* Update page count and character count limits

The maximum number of characters allowed in Java's book edit screen is
1024 for each page and 16 for the title. However, the packet itself has
a limit of 8192 * 3 bytes for each page and 128 * 3 bytes for the title.

* Fix writable book losing changes when signing

Bedrock sends a 3 action InventoryTransactionPacket after the player
changes a page. This causes Geyser to send a ServerboundEditBookPacket
with an outdated NBT. The Java responses with a
ClientboundContainerSetSlotPacket that overwrites any NBT Changes from
BedrockBookEditTranslator.

* Add a comment for the title length check

* Specify color in Component.translatable
2023-06-18 20:02:27 -04:00
..
Enchantment.java add Swift Sneak enchantment to known enchantments 2022-05-26 20:05:02 -04:00
Potion.java We're in 2022 now 2022-01-01 20:03:05 +01:00
StoredItemMappings.java Validate written_book tags and fix writable book losing changes (#3894) 2023-06-18 20:02:27 -04:00
TippedArrowPotion.java We're in 2022 now 2022-01-01 20:03:05 +01:00