pub struct MobPathSettings {Show 16 fields
entity_width: i32,
entity_height: i32,
entity_depth: i32,
mob_position_vec: DVec3,
mob_position: BlockPos,
bounding_box: WorldAabb,
on_ground: bool,
in_water: bool,
can_stand_on_fluid: fn(FluidState) -> bool,
max_up_step: f32,
max_fall_distance: i32,
malus: [f32; 27],
can_pass_doors: bool,
can_open_doors: bool,
can_float: bool,
can_walk_over_fences: bool,
}Fields§
§entity_width: i32§entity_height: i32§entity_depth: i32§mob_position_vec: DVec3§mob_position: BlockPos§bounding_box: WorldAabb§on_ground: bool§in_water: bool§can_stand_on_fluid: fn(FluidState) -> bool§max_up_step: f32§max_fall_distance: i32§malus: [f32; 27]§can_pass_doors: bool§can_open_doors: bool§can_float: bool§can_walk_over_fences: boolImplementations§
Source§impl MobPathSettings
impl MobPathSettings
pub fn from_mob<M: Mob + ?Sized>(mob: &M) -> Self
pub fn new( entity_width: i32, entity_height: i32, entity_depth: i32, mob_position: BlockPos, pathfinding_malus: &PathfindingMalus, ) -> Self
pub const fn with_can_pass_doors(self, can_pass_doors: bool) -> Self
pub const fn with_can_open_doors(self, can_open_doors: bool) -> Self
pub const fn with_can_float(self, can_float: bool) -> Self
pub const fn with_can_walk_over_fences(self, can_walk_over_fences: bool) -> Self
pub const fn with_max_up_step(self, max_up_step: f32) -> Self
pub const fn with_max_fall_distance(self, max_fall_distance: i32) -> Self
pub const fn with_on_ground(self, on_ground: bool) -> Self
pub const fn with_in_water(self, in_water: bool) -> Self
pub const fn with_can_stand_on_fluid( self, can_stand_on_fluid: fn(FluidState) -> bool, ) -> Self
pub const fn entity_width(&self) -> i32
pub const fn entity_height(&self) -> i32
pub const fn entity_depth(&self) -> i32
pub const fn mob_position(&self) -> BlockPos
pub const fn mob_position_vec(&self) -> DVec3
pub const fn bounding_box(&self) -> WorldAabb
pub const fn on_ground(&self) -> bool
pub const fn in_water(&self) -> bool
pub fn can_stand_on_fluid(&self, fluid_state: FluidState) -> bool
pub const fn max_up_step(&self) -> f32
pub const fn max_fall_distance(&self) -> i32
pub const fn pathfinding_malus(&self, path_type: PathType) -> f32
pub const fn can_pass_doors(&self) -> bool
pub const fn can_open_doors(&self) -> bool
pub const fn can_float(&self) -> bool
pub const fn can_walk_over_fences(&self) -> bool
Trait Implementations§
Source§impl Clone for MobPathSettings
impl Clone for MobPathSettings
Source§fn clone(&self) -> MobPathSettings
fn clone(&self) -> MobPathSettings
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 MobPathSettings
impl RefUnwindSafe for MobPathSettings
impl Send for MobPathSettings
impl Sync for MobPathSettings
impl Unpin for MobPathSettings
impl UnsafeUnpin for MobPathSettings
impl UnwindSafe for MobPathSettings
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<>>