pub trait PathfinderMob: Mob {
Show 22 methods
// Provided methods
fn controlled_pathfinder_vehicle(&self) -> Option<SharedEntity> { ... }
fn get_walk_target_value(&self, pos: BlockPos) -> f32 { ... }
fn can_update_path(&self) -> bool { ... }
fn can_path_to_targets_below_surface(&self) -> bool { ... }
fn can_reach_living_target(&self, target: &dyn LivingEntity) -> bool { ... }
fn tick_pathfinder_path_navigation(&self) { ... }
fn tick_pathfinder_goal_selectors(&self, entity: &SharedEntity)
where Self: Sized { ... }
fn is_stable_destination(&self, pos: BlockPos) -> bool { ... }
fn create_path_to(&self, target: BlockPos, reach_range: i32) -> Option<Path> { ... }
fn recompute_path(&self, request: NavigationRecomputeRequest) { ... }
fn move_to_pos(&self, target: DVec3, speed_modifier: f64) -> bool { ... }
fn move_to_pos_with_reach(
&self,
target: DVec3,
reach_range: i32,
speed_modifier: f64,
) -> bool { ... }
fn move_to_path(&self, path: Option<Path>, speed_modifier: f64) -> bool { ... }
fn is_path_finding(&self) -> bool { ... }
fn is_panicking(&self) -> bool { ... }
fn should_stay_close_to_leash_holder(&self) -> bool { ... }
fn follow_leash_speed(&self) -> f64 { ... }
fn when_leashed_to_pathfinder(&self, holder: &dyn Entity) { ... }
fn close_range_leash_behaviour_pathfinder(&self, holder: &dyn Entity) { ... }
fn remove_all_goals(&self, predicate: impl FnMut(&dyn Goal) -> bool)
where Self: Sized { ... }
fn remove_free_will(&self)
where Self: Sized { ... }
fn create_path_to_targets(
&self,
world: &Arc<World>,
targets: &[BlockPos],
reach_range: i32,
) -> Option<Path> { ... }
}Provided Methods§
fn controlled_pathfinder_vehicle(&self) -> Option<SharedEntity>
Sourcefn get_walk_target_value(&self, pos: BlockPos) -> f32
fn get_walk_target_value(&self, pos: BlockPos) -> f32
Scores pathfinding positions: animals favor light, monsters darkness.
fn can_update_path(&self) -> bool
fn can_path_to_targets_below_surface(&self) -> bool
fn can_reach_living_target(&self, target: &dyn LivingEntity) -> bool
fn tick_pathfinder_goal_selectors(&self, entity: &SharedEntity)where
Self: Sized,
fn is_stable_destination(&self, pos: BlockPos) -> bool
fn create_path_to(&self, target: BlockPos, reach_range: i32) -> Option<Path>
fn recompute_path(&self, request: NavigationRecomputeRequest)
fn move_to_pos(&self, target: DVec3, speed_modifier: f64) -> bool
fn move_to_pos_with_reach( &self, target: DVec3, reach_range: i32, speed_modifier: f64, ) -> bool
fn move_to_path(&self, path: Option<Path>, speed_modifier: f64) -> bool
fn is_path_finding(&self) -> bool
fn is_panicking(&self) -> bool
fn should_stay_close_to_leash_holder(&self) -> bool
fn follow_leash_speed(&self) -> f64
fn when_leashed_to_pathfinder(&self, holder: &dyn Entity)
Sourcefn close_range_leash_behaviour_pathfinder(&self, holder: &dyn Entity)
fn close_range_leash_behaviour_pathfinder(&self, holder: &dyn Entity)
Re-enables MOVE and follows a nearby holder unless panicking.
Brain-based panic detection awaits Brain support; Steel uses vanilla’s
running-PanicGoal fallback.
Sourcefn remove_all_goals(&self, predicate: impl FnMut(&dyn Goal) -> bool)where
Self: Sized,
fn remove_all_goals(&self, predicate: impl FnMut(&dyn Goal) -> bool)where
Self: Sized,
Stops and removes matching goals. Lives on PathfinderMob rather than
vanilla’s Mob because Steel’s goal hooks require pathfinding mobs.
fn remove_free_will(&self)where
Self: Sized,
fn create_path_to_targets( &self, world: &Arc<World>, targets: &[BlockPos], reach_range: i32, ) -> Option<Path>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".