Because apparently it's not just a constant; it makes a new array every time.
Also, GeyserSession#tick() does not need to be public and I made enchantments in commands use the Java list.
If the server spams the window property update packet, then the network ID assigned for each enchanting slot will update too quickly, essentially disabling enchanting. This commit remedies this by only updating the network ID of each slot if a property changed.
* Fix horse health display
* Fix horses warping back when damaged
* Fix horse jumping animation
* Fix horses not taking damage while standing on magma
* Allow mules and donkeys to jump
This commit brings full support for crawling, sneaking under 1.5-block-tall spaces, and swimming in one-block areas. There is a check in place that decreases the player's speed to something comparable to Java if they are in a situation where they would otherwise go at normal walking speed (for example: without the check, a Bedrock player would go at full walking speed while crawling).
On Bedrock, a banner must be placed in the chestplate slot in order to be visible. On Java Edition, banners are placed in the helmet slot. This commit fixes the issue by migrating banners to the chestplate spot if the chestplate spot is empty.
This commit also fixes pillager poses if they're not holding a crossbow, along with a couple other optimizations.
Conveniently enough, the minecart furnace icon still exists in the vanilla Bedrock Edition game (thanks to Kastle for this discovery). With this and the translation string still being present, we can add the item into the game with only minor issues.
- If GeyserConnector.getPlayerByUuid is given null, it will return null
- Never set a session's UUID to null if possible - but have precautions if for some reason it is
Note that this needs to be revisited to see if it's even needed, or perhaps some sort of Guava cache.
- `getCachedPlayerEntityLink` now removes the entry if found
- Skulls will not have player entity links so we shouldn't bother checking
- Clear the entity link cache on dimension switch
- Shield code is now down as the player is sneaking - it doesn't wait for the server to update our sneaking status
- Shield is now applied correctly when sneaking and then moving to the shield item