From e4ead93f195d3d91fd809dfc8cfee9cc36aabcbc Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 9 Jun 2025 21:33:21 -0330 Subject: jump if in water while executing pathfinder path --- azalea/src/pathfinder/moves/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'azalea/src/pathfinder/moves/mod.rs') diff --git a/azalea/src/pathfinder/moves/mod.rs b/azalea/src/pathfinder/moves/mod.rs index 6c26a507..44d31bfb 100644 --- a/azalea/src/pathfinder/moves/mod.rs +++ b/azalea/src/pathfinder/moves/mod.rs @@ -111,6 +111,12 @@ impl ExecuteCtx<'_, '_, '_, '_, '_, '_, '_> { }); } + pub fn jump_if_in_water(&mut self) { + if self.physics.is_in_water() { + self.jump(); + } + } + /// Returns whether this block could be mined. pub fn should_mine(&mut self, block: BlockPos) -> bool { let block_state = self -- cgit v1.2.3