aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder/moves/mod.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-10-02 18:53:27 -0500
committermat <git@matdoes.dev>2023-10-02 18:53:27 -0500
commit7b10e5cd7e80be85f7b0517f941b175e733d3fc4 (patch)
tree1c99d6f4670456da4792f5c6be369662676ddd82 /azalea/src/pathfinder/moves/mod.rs
parentd0505f7de30e4a9a330ef99d0082849ee44723e0 (diff)
downloadazalea-drasl-7b10e5cd7e80be85f7b0517f941b175e733d3fc4.tar.xz
optimize pathfinder more
Diffstat (limited to 'azalea/src/pathfinder/moves/mod.rs')
-rw-r--r--azalea/src/pathfinder/moves/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea/src/pathfinder/moves/mod.rs b/azalea/src/pathfinder/moves/mod.rs
index caf4bbb4..9eb6462b 100644
--- a/azalea/src/pathfinder/moves/mod.rs
+++ b/azalea/src/pathfinder/moves/mod.rs
@@ -80,7 +80,7 @@ impl<'a> PathfinderCtx<'a> {
// fast path
return true;
}
- if block.shape() != &*collision::EMPTY_SHAPE {
+ if !block.is_shape_empty() {
return false;
}
if block == azalea_registry::Block::Water.into() {
@@ -107,7 +107,7 @@ impl<'a> PathfinderCtx<'a> {
// fast path
return false;
}
- block.shape() == &*collision::BLOCK_SHAPE
+ block.is_shape_full()
}
/// Whether this block and the block above are passable