diff options
| author | mat <git@matdoes.dev> | 2025-06-09 21:33:21 -0330 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-09 21:33:21 -0330 |
| commit | e4ead93f195d3d91fd809dfc8cfee9cc36aabcbc (patch) | |
| tree | 3be2352136fb71433a57a9cbf938005e8e7f9b5b /azalea/src/pathfinder/moves/mod.rs | |
| parent | 086f979a2895e7f15ec61e5704869a0cfc94d16f (diff) | |
| download | azalea-drasl-e4ead93f195d3d91fd809dfc8cfee9cc36aabcbc.tar.xz | |
jump if in water while executing pathfinder path
Diffstat (limited to 'azalea/src/pathfinder/moves/mod.rs')
| -rw-r--r-- | azalea/src/pathfinder/moves/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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 |
