pub(crate) struct SpawnPlacements;Expand description
Vanilla SpawnPlacements.
Predicates are each entity’s SPAWN_RULE, registered by #[entity_behavior(spawn_rule)].
Placement type and heightmap are not modeled yet because only the spawner path consumes this.
Implementations§
Source§impl SpawnPlacements
impl SpawnPlacements
Sourcepub(crate) fn check_spawner_spawn_rules(
entity_type: EntityTypeRef,
world: &World,
pos: BlockPos,
random: &mut dyn Rng,
) -> bool
pub(crate) fn check_spawner_spawn_rules( entity_type: EntityTypeRef, world: &World, pos: BlockPos, random: &mut dyn Rng, ) -> bool
Checks the vanilla placement predicate used by normal mob spawners.
Auto Trait Implementations§
impl Freeze for SpawnPlacements
impl RefUnwindSafe for SpawnPlacements
impl Send for SpawnPlacements
impl Sync for SpawnPlacements
impl Unpin for SpawnPlacements
impl UnsafeUnpin for SpawnPlacements
impl UnwindSafe for SpawnPlacements
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
§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<>>