diff options
| author | mat <git@matdoes.dev> | 2026-01-06 04:26:29 +0200 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-01-05 17:57:54 -0900 |
| commit | 9c2c7c3497a74e80d7186fdcd97ce2518520faa6 (patch) | |
| tree | 3c4984e3a42ecaf4dcc5fa7503d83c734a03477e /azalea/src/pathfinder/world.rs | |
| parent | 28fe2d21dc03b96baa61c3b142baff3af5b92a76 (diff) | |
| download | azalea-drasl-9c2c7c3497a74e80d7186fdcd97ce2518520faa6.tar.xz | |
pathfinder fixes and api improvements
don't pathfind on magma, fix mining blocks while swimming, fix RadiusGoal heuristic, and add Client::physics, is_executing_path, and is_calculating_path
Diffstat (limited to 'azalea/src/pathfinder/world.rs')
| -rw-r--r-- | azalea/src/pathfinder/world.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/azalea/src/pathfinder/world.rs b/azalea/src/pathfinder/world.rs index 956b0226..13d60162 100644 --- a/azalea/src/pathfinder/world.rs +++ b/azalea/src/pathfinder/world.rs @@ -623,6 +623,12 @@ pub fn is_block_state_solid(block_state: BlockState) -> bool { // fast path return false; } + + // hazard + if block_state == BlockState::from(BlockKind::MagmaBlock) { + return false; + }; + if block_state.is_collision_shape_full() { return true; } @@ -692,7 +698,7 @@ mod tests { let ctx = CachedWorld::new(Arc::new(RwLock::new(world.into())), BlockPos::default()); assert!(!ctx.is_block_pos_passable(BlockPos::new(0, 0, 0))); - assert!(ctx.is_block_pos_passable(BlockPos::new(0, 1, 0),)); + assert!(ctx.is_block_pos_passable(BlockPos::new(0, 1, 0))); } #[test] |
