From 3d340f585a320d1d6553756e6ed85d0bd88af3b2 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 23 May 2025 11:20:57 -1345 Subject: [PATCH] doc fixes --- azalea-client/src/plugins/interact.rs | 2 +- azalea-world/src/container.rs | 1 + azalea/src/pathfinder/mod.rs | 13 ++----------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/azalea-client/src/plugins/interact.rs b/azalea-client/src/plugins/interact.rs index c623663e..1baef2db 100644 --- a/azalea-client/src/plugins/interact.rs +++ b/azalea-client/src/plugins/interact.rs @@ -131,7 +131,7 @@ pub struct HitResultComponent(HitResult); pub struct StartUseItemEvent { pub entity: Entity, pub hand: InteractionHand, - /// See [`QueuedStartUseItem::force_block`]. + /// See [`StartUseItemQueued::force_block`]. pub force_block: Option, } pub fn handle_start_use_item_event( diff --git a/azalea-world/src/container.rs b/azalea-world/src/container.rs index 2bccddac..53b9c784 100644 --- a/azalea-world/src/container.rs +++ b/azalea-world/src/container.rs @@ -89,4 +89,5 @@ impl InstanceContainer { /// in. If two entities share the same world name, we assume they're in the same /// instance. #[derive(Component, Clone, Debug, PartialEq, Deref, DerefMut)] +#[doc(alias("worldname", "world name"))] pub struct InstanceName(pub ResourceLocation); diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index 733a3603..afb1cc4d 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -452,14 +452,6 @@ pub fn calculate_path(opts: CalculatePathOpts) -> Option { debug!("this path is empty, we might be stuck :("); } - // replace the RelBlockPos types with BlockPos - // let mapped_path = path - // .into_iter() - // .map(|movement| astar::Movement { - // target: movement.target.apply(origin), - // data: movement.data, - // }) - // .collect(); let mut mapped_path = VecDeque::with_capacity(path.len()); let mut current_position = RelBlockPos::get_origin(origin); for movement in path { @@ -476,7 +468,7 @@ pub fn calculate_path(opts: CalculatePathOpts) -> Option { ); current_position = found_edge.movement.target; - // we don't just copy the found_edge because we're using BlockPos instead of + // we don't just clone the found_edge because we're using BlockPos instead of // RelBlockPos as the target type mapped_path.push_back(Edge { movement: astar::Movement { @@ -966,8 +958,7 @@ pub fn recalculate_near_end_of_path( allow_mining: pathfinder.allow_mining, min_timeout: if executing_path.path.len() == 50 { // we have quite some time until the node is reached, soooo we might as - // well burn some cpu cycles to get a good - // path + // well burn some cpu cycles to get a good path PathfinderTimeout::Time(Duration::from_secs(5)) } else { PathfinderTimeout::Time(Duration::from_secs(1))