Struct AgeableGroup
#[non_exhaustive]pub struct AgeableGroup {
pub size: i32,
pub should_spawn_baby: bool,
pub baby_chance: f32,
}Expand description
AgeableMob.AgeableMobGroupData: whether the pack’s later members may be babies.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.size: i32How many mobs of the pack have been finalized with this group so far.
should_spawn_baby: boolWhether a later member may spawn as a baby.
baby_chance: f32The chance a later member is a baby.
Implementations§
§impl AgeableGroup
impl AgeableGroup
pub fn new(should_spawn_baby: bool, baby_chance: f32) -> AgeableGroup
pub fn new(should_spawn_baby: bool, baby_chance: f32) -> AgeableGroup
A group no mob has used yet.
Trait Implementations§
§impl Clone for AgeableGroup
impl Clone for AgeableGroup
§fn clone(&self) -> AgeableGroup
fn clone(&self) -> AgeableGroup
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 moreimpl Copy for AgeableGroup
§impl Debug for AgeableGroup
impl Debug for AgeableGroup
§impl PartialEq for AgeableGroup
impl PartialEq for AgeableGroup
impl StructuralPartialEq for AgeableGroup
Auto Trait Implementations§
impl Freeze for AgeableGroup
impl RefUnwindSafe for AgeableGroup
impl Send for AgeableGroup
impl Sync for AgeableGroup
impl Unpin for AgeableGroup
impl UnsafeUnpin for AgeableGroup
impl UnwindSafe for AgeableGroup
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