pub struct WalkNodeEvaluator {
settings: MobPathSettings,
nodes: NodeStore,
}Fields§
§settings: MobPathSettings§nodes: NodeStoreImplementations§
Source§impl WalkNodeEvaluator
impl WalkNodeEvaluator
pub fn new(settings: MobPathSettings) -> Self
pub const fn settings(&self) -> &MobPathSettings
pub fn clear_nodes(&mut self)
pub fn node(&self, hash: i32) -> Option<&Node>
pub(crate) fn node_mut(&mut self, hash: i32) -> Option<&mut Node>
pub(crate) const fn nodes_mut(&mut self) -> &mut NodeStore
pub(crate) fn reset_search_state(&mut self)
pub fn get_start(&mut self, context: &mut PathfindingContext<'_>) -> i32
pub fn get_neighbors( &mut self, context: &mut PathfindingContext<'_>, collision: &mut impl WalkNodeCollision, pos_hash: i32, ) -> WalkNeighbors
pub fn get_floor_level( &self, context: &PathfindingContext<'_>, pos: BlockPos, ) -> f64
pub fn floor_level(level: &dyn LevelReader, pos: BlockPos) -> f64
pub fn get_path_type_of_mob( &self, context: &mut PathfindingContext<'_>, x: i32, y: i32, z: i32, ) -> PathType
pub fn find_accepted_node( &mut self, context: &mut PathfindingContext<'_>, collision: &mut impl WalkNodeCollision, request: AcceptedNodeRequest, ) -> Option<i32>
pub fn get_path_type_within_mob_bb( &self, context: &mut PathfindingContext<'_>, x: i32, y: i32, z: i32, ) -> PathTypeSet
fn adjust_path_type_for_mob( &self, context: &mut PathfindingContext<'_>, block_type: PathType, mob_on_rail: &mut Option<bool>, ) -> PathType
fn first_startable_corner( &self, context: &mut PathfindingContext<'_>, start_y: i32, ) -> Option<BlockPos>
fn get_start_node( &mut self, context: &mut PathfindingContext<'_>, pos: BlockPos, ) -> i32
fn can_start_at( &self, context: &mut PathfindingContext<'_>, pos: BlockPos, ) -> bool
fn is_neighbor_valid(&self, node: Option<i32>, current_cost_malus: f32) -> bool
fn is_diagonal_corner_valid( &self, current_y: i32, first: Option<i32>, second: Option<i32>, ) -> bool
fn is_diagonal_node_valid(&self, node: Option<i32>) -> bool
fn try_jump_on( &mut self, context: &mut PathfindingContext<'_>, collision: &mut impl WalkNodeCollision, request: AcceptedNodeRequest, ) -> Option<i32>
fn try_find_first_non_water_below( &mut self, context: &mut PathfindingContext<'_>, x: i32, y: i32, z: i32, best: Option<i32>, ) -> Option<i32>
fn try_find_first_ground_node_below( &mut self, context: &mut PathfindingContext<'_>, x: i32, y: i32, z: i32, ) -> i32
fn can_reach_without_collision( &self, collision: &mut impl WalkNodeCollision, target: i32, ) -> bool
fn mob_jump_height(&self) -> f64
fn get_node_and_update_cost_to_max( &mut self, x: i32, y: i32, z: i32, path_type: PathType, cost: f32, ) -> i32
fn get_blocked_node(&mut self, x: i32, y: i32, z: i32) -> i32
fn get_closed_node( &mut self, x: i32, y: i32, z: i32, path_type: PathType, ) -> i32
Trait Implementations§
Source§impl Clone for WalkNodeEvaluator
impl Clone for WalkNodeEvaluator
Source§fn clone(&self) -> WalkNodeEvaluator
fn clone(&self) -> WalkNodeEvaluator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WalkNodeEvaluator
impl RefUnwindSafe for WalkNodeEvaluator
impl Send for WalkNodeEvaluator
impl Sync for WalkNodeEvaluator
impl Unpin for WalkNodeEvaluator
impl UnsafeUnpin for WalkNodeEvaluator
impl UnwindSafe for WalkNodeEvaluator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>