From 0691373310676768ef5268daef0e03b583c2cbe9 Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 2 Oct 2023 20:59:51 -0500 Subject: cleanup --- azalea/src/pathfinder/mod.rs | 2 +- azalea/src/pathfinder/moves/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea/src') diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index 74b4342f..f4d16ca5 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -194,7 +194,7 @@ fn goto_listener( |n| goal.heuristic(n), successors, |n| goal.success(n), - Duration::from_secs(if attempt_number == 0 { 10 } else { 10 }), + Duration::from_secs(if attempt_number == 0 { 1 } else { 5 }), ); let end_time = std::time::Instant::now(); debug!("partial: {partial:?}"); diff --git a/azalea/src/pathfinder/moves/mod.rs b/azalea/src/pathfinder/moves/mod.rs index 907db4fc..39e5374f 100644 --- a/azalea/src/pathfinder/moves/mod.rs +++ b/azalea/src/pathfinder/moves/mod.rs @@ -48,6 +48,7 @@ impl<'a> PathfinderCtx<'a> { fn get_block_state(&self, pos: &BlockPos) -> Option { let chunk_pos = ChunkPos::from(pos); + let chunk_block_pos = ChunkBlockPos::from(pos); let mut cached_chunks = self.cached_chunks.borrow_mut(); if let Some(sections) = cached_chunks.iter().find_map(|(pos, sections)| { @@ -59,7 +60,7 @@ impl<'a> PathfinderCtx<'a> { }) { return azalea_world::chunk_storage::get_block_state_from_sections( sections, - &ChunkBlockPos::from(pos), + &chunk_block_pos, self.world.min_y, ); } @@ -69,7 +70,6 @@ impl<'a> PathfinderCtx<'a> { cached_chunks.push((chunk_pos, chunk.sections.clone())); - let chunk_block_pos = ChunkBlockPos::from(pos); azalea_world::chunk_storage::get_block_state_from_sections( &chunk.sections, &chunk_block_pos, -- cgit v1.2.3