Geyser/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player
David Choo 9ea22042eb
Fix some item interactions (#3083)
* Remove Bedrock only banner patterns from the creative inventory

* Add sound for tadpole bucket

* Fix lily pad and frogspawn placing on mobile/single stacks

* Workaround? Fix? for bucket usage on mobile

* Simplify math and update position+rotation whenever ServerboundUseItemPacket is sent

* Rotate the player back after using an item and fix glass bottles

* ITEM_USE actionType 1 does not need the rotation fix

Increase delay for look back

* Add some checks

* Prevent buckets and spawn eggs from being unintentionally placed when interacting with special blocks

As of 1.19 Bedrock no longer sends a PlayerActionPacket with action=BLOCK_INTERACT. Bedrock now sends action=ITEM_USE_ON_START before and action=ITEM_USE_ON_STOP after using an item on a block. However, this is not useful as it is sent for all block interactions.

* Fix inventory transactions being rejected after restoreCorrectBlock

The held item's netId is always 0 in the InventoryTransactionPacket.

* Touch ups

* Fix lookAt for different poses and sneaking + cauldron + bucket interactions

Fix boat items being desynced when placing them very close to collision
Fix bottles being desynced when tapping above water

Resend the held item if we do encounter a desync

* Avoid getting blockstate twice and fix comment

* Use generated interaction data

* Fix glass bottles being double filled and phantom water bottles/water buckets

* Don't update the entire inventory on useItem

* Use Geyser's inventory copy for check

* Use ItemTranslator#getBedrockItemMapping to avoid NBT translation

* mappings

Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2022-06-24 16:48:28 -04:00
..
BedrockActionTranslator.java Fix some item interactions (#3083) 2022-06-24 16:48:28 -04:00
BedrockEmoteTranslator.java Switch all Position instances to Vector3i 2022-05-25 19:17:49 -04:00
BedrockInteractTranslator.java Implement chest boat 2022-05-26 13:11:39 -04:00
BedrockMovePlayerTranslator.java Fix some item interactions (#3083) 2022-06-24 16:48:28 -04:00
BedrockRiderJumpTranslator.java We're in 2022 now 2022-01-01 20:03:05 +01:00
BedrockSetPlayerGameTypeTranslator.java We're in 2022 now 2022-01-01 20:03:05 +01:00