The block change acknowledgement was only sent from the keepalive timer,
so it went out at most once every 15s. Until it lands the client keeps
showing its own prediction for the block it interacted with and drops our
updates for that position.
Vanilla sends it at the end of the packet that carried the sequence, so
move it there.
* fix(command): send success message after teleport
All seven executors in teleport.rs performed the teleport but never sent a
feedback message to the command sender. Send the existing success
translation keys (entity/location, single/multiple) via sender.send_message.
Fixes#2920
* fix(command): elide needless lifetime in tp success helper
* fix(command): add bedrock translations for tp success message
The rest of the pathfinder already uses rustc-hash's FxHashMap/FxHashSet, but
compute_path's closed_set, the path-reconstruction visited set, and the
Navigator's path_type_overrides were still on the default SipHash hasher.
Switch them to FxHashMap/FxHashSet for consistency and to shave hashing off the
per-repath hot path. Keys are Vector3<i32>/PathType (small, internal). No new
dependency and no behavior change.
Adds vanilla dispense behavior for snowballs, eggs, splash and
lingering potions, fire charges, wind charges, firework rockets,
empty and filled buckets, flint and steel (including priming TNT)
and honeycomb.
Refactors the player-path helpers (Ignition::ignite_block, bucket
pickup/placement, honeycomb waxing) so they can be reused without a
Player, and emits the wax-on world event for players as well.
Co-authored-by: Mcxiaocaibug <Mcxiaocaibug@users.noreply.github.com>
The placement and swing packet 'hand' fields use 0 = main hand, but they were
decoded with TryFrom<i32>, which maps 0 -> Hand::Left (that conversion is for
the client's dominant-hand setting). Hand::Left means off-hand in the inventory
API, so the decremented stack was written back to the off-hand instead of the
main hand, causing non-consumed placement and duplication into the off-hand.
Use Hand::from_packet_id for these packet fields and read the item via
inventory.get_stack_in_hand, matching the existing use_item handler.