aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/auto_tool.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2024-12-11 19:51:12 -0600
committerGitHub <noreply@github.com>2024-12-11 19:51:12 -0600
commite9136c9cbbf9010b8352127e129c1cd290f377bd (patch)
treedb83316a273153106dd3b343c9d6d4fce234d132 /azalea/src/auto_tool.rs
parent23932003d98db0f5f976146aa9a11e5d04a74695 (diff)
downloadazalea-drasl-e9136c9cbbf9010b8352127e129c1cd290f377bd.tar.xz
Implement EntityPositionSync (#196)
* implement EntityPositionSync * fix EntityPositionSync setting the wrong vec_delta_codec and also move into a RelativeEntityUpdate
Diffstat (limited to 'azalea/src/auto_tool.rs')
-rw-r--r--azalea/src/auto_tool.rs22
1 files changed, 4 insertions, 18 deletions
diff --git a/azalea/src/auto_tool.rs b/azalea/src/auto_tool.rs
index 5fcb8037..768d3089 100644
--- a/azalea/src/auto_tool.rs
+++ b/azalea/src/auto_tool.rs
@@ -31,24 +31,10 @@ impl AutoToolClientExt for Client {
/// or in water, use [`accurate_best_tool_in_hotbar_for_block`] instead if you
/// care about those things.
pub fn best_tool_in_hotbar_for_block(block: BlockState, menu: &Menu) -> BestToolResult {
- accurate_best_tool_in_hotbar_for_block(
- block,
- menu,
- &Physics {
- on_ground: true,
- velocity: Default::default(),
- xxa: Default::default(),
- yya: Default::default(),
- zza: Default::default(),
- last_on_ground: Default::default(),
- dimensions: Default::default(),
- bounding_box: Default::default(),
- has_impulse: Default::default(),
- horizontal_collision: Default::default(),
- vertical_collision: Default::default(),
- },
- &FluidOnEyes::new(Fluid::Empty),
- )
+ let mut physics = Physics::default();
+ physics.set_on_ground(true);
+
+ accurate_best_tool_in_hotbar_for_block(block, menu, &physics, &FluidOnEyes::new(Fluid::Empty))
}
pub fn accurate_best_tool_in_hotbar_for_block(