pub struct PigEntity {
base: EntityBase,
entity_type: EntityTypeRef,
living_base: LivingEntityBase,
mob_base: MobBase,
ageable_base: AgeableMobBase,
animal_base: AnimalBase,
steering: SyncMutex<ItemBasedSteering>,
entity_data: SyncMutex<PigEntityData>,
}Expand description
Vanilla pig entity.
Fields§
§base: EntityBase§entity_type: EntityTypeRef§living_base: LivingEntityBase§mob_base: MobBase§ageable_base: AgeableMobBase§animal_base: AnimalBase§steering: SyncMutex<ItemBasedSteering>§entity_data: SyncMutex<PigEntityData>Implementations§
Source§impl PigEntity
impl PigEntity
Sourcepub fn new(
entity_type: EntityTypeRef,
id: i32,
position: DVec3,
world: Weak<World>,
) -> Self
pub fn new( entity_type: EntityTypeRef, id: i32, position: DVec3, world: Weak<World>, ) -> Self
Creates a new pig entity.
Sourcepub fn from_saved(entity_type: EntityTypeRef, load: EntityBaseLoad) -> Self
pub fn from_saved(entity_type: EntityTypeRef, load: EntityBaseLoad) -> Self
Creates a pig entity from saved base data.
fn new_with_base(base: EntityBase, entity_type: EntityTypeRef) -> Self
Sourcepub fn set_variant(&self, variant: PigVariantRef)
pub fn set_variant(&self, variant: PigVariantRef)
Sets the current pig variant by registry entry.
Sourcepub fn set_sound_variant(&self, sound_variant: PigSoundVariantRef)
pub fn set_sound_variant(&self, sound_variant: PigSoundVariantRef)
Sets the current pig sound variant by registry entry.
Sourcepub fn sound_variant(&self) -> PigSoundVariantRef
pub fn sound_variant(&self) -> PigSoundVariantRef
Returns the current pig sound variant.
fn set_variant_by_key(&self, key: &Identifier) -> bool
fn set_sound_variant_by_key(&self, key: &Identifier)
fn current_sound_set(&self) -> &'static PigAge
fn set_ridden_rotation(&self, controller_yaw: f32, controller_pitch: f32)
fn update_dirty_mob_effect_entity_data(&self)
Trait Implementations§
Source§impl AgeableMob for PigEntity
impl AgeableMob for PigEntity
Source§fn ageable_base(&self) -> &AgeableMobBase
fn ageable_base(&self) -> &AgeableMobBase
Returns shared ageable runtime state.
Source§fn is_age_locked(&self) -> bool
fn is_age_locked(&self) -> bool
Returns the synchronized vanilla age-lock flag.
Source§fn set_age_locked(&self, age_locked: bool)
fn set_age_locked(&self, age_locked: bool)
Sets the synchronized vanilla age-lock flag.
Source§fn set_synced_baby(&self, baby: bool)
fn set_synced_baby(&self, baby: bool)
Sets the synchronized baby flag.
Source§fn age_boundary_changed(&self, _baby: bool)
fn age_boundary_changed(&self, _baby: bool)
Hook called after the baby/adult boundary changes.
Source§fn get_baby_start_age(&self) -> i32
fn get_baby_start_age(&self) -> i32
Returns vanilla
AgeableMob.getBabyStartAge.Source§fn forced_age(&self) -> i32
fn forced_age(&self) -> i32
Returns vanilla
AgeableMob.forcedAge.Source§fn set_forced_age(&self, forced_age: i32)
fn set_forced_age(&self, forced_age: i32)
Sets vanilla
AgeableMob.forcedAge.Source§fn forced_age_timer(&self) -> i32
fn forced_age_timer(&self) -> i32
Returns vanilla
AgeableMob.forcedAgeTimer.Source§fn set_forced_age_timer(&self, forced_age_timer: i32)
fn set_forced_age_timer(&self, forced_age_timer: i32)
Sets vanilla
AgeableMob.forcedAgeTimer.Source§fn age_lock_particle_timer(&self) -> i32
fn age_lock_particle_timer(&self) -> i32
Returns vanilla
AgeableMob.ageLockParticleTimer.Source§fn set_age_lock_particle_timer(&self, timer: i32)
fn set_age_lock_particle_timer(&self, timer: i32)
Sets vanilla
AgeableMob.ageLockParticleTimer.Source§fn can_age_up(&self) -> bool
fn can_age_up(&self) -> bool
Returns whether this mob can naturally age toward adulthood this tick.
Source§fn get_speed_up_seconds_when_feeding(ticks_until_adult: i32) -> i32where
Self: Sized,
fn get_speed_up_seconds_when_feeding(ticks_until_adult: i32) -> i32where
Self: Sized,
Returns vanilla
AgeableMob.getSpeedUpSecondsWhenFeeding.Source§fn finalize_spawn_ageable_mob(
&self,
world: &Arc<World>,
spawn_reason: EntitySpawnReason,
group_data: Option<SpawnGroupData>,
) -> Option<SpawnGroupData>
fn finalize_spawn_ageable_mob( &self, world: &Arc<World>, spawn_reason: EntitySpawnReason, group_data: Option<SpawnGroupData>, ) -> Option<SpawnGroupData>
Runs vanilla
AgeableMob.finalizeSpawn, then delegates to Mob.finalizeSpawn.Source§fn mob_interact_ageable(
&self,
player: &Player,
hand: InteractionHand,
) -> InteractionResult
fn mob_interact_ageable( &self, player: &Player, hand: InteractionHand, ) -> InteractionResult
Handles vanilla
AgeableMob.mobInteract.Source§fn tick_ageable_mob(&self)
fn tick_ageable_mob(&self)
Ticks vanilla age progression.
Source§fn save_ageable_mob(&self, nbt: &mut NbtCompound)
fn save_ageable_mob(&self, nbt: &mut NbtCompound)
Saves vanilla ageable mob fields.
Source§fn load_ageable_mob(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn load_ageable_mob(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
Loads vanilla ageable mob fields.
Source§impl Animal for PigEntity
impl Animal for PigEntity
Source§fn animal_base(&self) -> &AnimalBase
fn animal_base(&self) -> &AnimalBase
Returns shared animal runtime state.
Source§fn is_food(&self, item_stack: &ItemStack) -> bool
fn is_food(&self, item_stack: &ItemStack) -> bool
Returns whether the stack is valid food for this animal.
Source§fn play_eating_sound(&self)
fn play_eating_sound(&self)
Plays this animal’s vanilla eating sound.
Source§fn breed_variant_key(&self) -> Option<&Identifier>
fn breed_variant_key(&self) -> Option<&Identifier>
Returns this animal’s breedable variant key when offspring inherit it.
Source§fn set_breed_variant_key(&self, key: &Identifier) -> bool
fn set_breed_variant_key(&self, key: &Identifier) -> bool
Applies a breedable variant key to offspring that inherit one.
Source§fn initialize_breed_offspring(
&self,
partner: &dyn Animal,
offspring: &dyn Animal,
)
fn initialize_breed_offspring( &self, partner: &dyn Animal, offspring: &dyn Animal, )
Applies entity-specific state to freshly created breeding offspring.
Source§fn in_love_time(&self) -> i32
fn in_love_time(&self) -> i32
Returns vanilla
Animal.inLove.Source§fn set_in_love_time(&self, in_love: i32)
fn set_in_love_time(&self, in_love: i32)
Sets vanilla
Animal.inLove.Source§fn love_cause_uuid(&self) -> Option<Uuid>
fn love_cause_uuid(&self) -> Option<Uuid>
Returns vanilla
Animal.loveCause as a persisted UUID.Source§fn set_love_cause_uuid(&self, love_cause: Option<Uuid>)
fn set_love_cause_uuid(&self, love_cause: Option<Uuid>)
Sets vanilla
Animal.loveCause as a persisted UUID.Source§fn is_in_love(&self) -> bool
fn is_in_love(&self) -> bool
Returns vanilla
Animal.isInLove.Source§fn can_fall_in_love(&self) -> bool
fn can_fall_in_love(&self) -> bool
Returns vanilla
Animal.canFallInLove.Source§fn set_in_love(&self, player: Option<&Player>)
fn set_in_love(&self, player: Option<&Player>)
Sets vanilla love mode and records the player that caused it.
Source§fn reset_love(&self)
fn reset_love(&self)
Resets vanilla love mode without clearing the stored love cause.
Source§fn base_experience_reward_animal(&self) -> i32
fn base_experience_reward_animal(&self) -> i32
Returns vanilla
Animal.getBaseExperienceReward.Source§fn ambient_sound_interval_animal(&self) -> i32
fn ambient_sound_interval_animal(&self) -> i32
Returns vanilla
Animal.getAmbientSoundInterval.Source§fn animal_walk_target_value(&self, pos: BlockPos) -> f32
fn animal_walk_target_value(&self, pos: BlockPos) -> f32
Returns vanilla
Animal.getWalkTargetValue.Source§fn is_bright_enough_to_spawn(level: &dyn LevelReader, pos: BlockPos) -> boolwhere
Self: Sized,
fn is_bright_enough_to_spawn(level: &dyn LevelReader, pos: BlockPos) -> boolwhere
Self: Sized,
Returns vanilla
Animal.isBrightEnoughToSpawn.Source§fn check_animal_spawn_rules(
level: &dyn LevelReader,
spawn_reason: EntitySpawnReason,
pos: BlockPos,
) -> boolwhere
Self: Sized,
fn check_animal_spawn_rules(
level: &dyn LevelReader,
spawn_reason: EntitySpawnReason,
pos: BlockPos,
) -> boolwhere
Self: Sized,
Returns vanilla
Animal.checkAnimalSpawnRules.Source§fn mob_interact_animal(
&self,
player: &Player,
hand: InteractionHand,
) -> InteractionResult
fn mob_interact_animal( &self, player: &Player, hand: InteractionHand, ) -> InteractionResult
Handles vanilla
Animal.mobInteract.Source§fn create_breed_offspring(&self, world: &Arc<World>) -> Option<SharedEntity>
fn create_breed_offspring(&self, world: &Arc<World>) -> Option<SharedEntity>
Creates a same-type offspring using the registered entity factory.
Source§fn get_breed_offspring(
&self,
world: &Arc<World>,
partner: &dyn Animal,
) -> Option<SharedEntity>
fn get_breed_offspring( &self, world: &Arc<World>, partner: &dyn Animal, ) -> Option<SharedEntity>
Creates this animal’s vanilla breeding offspring.
Source§fn spawn_child_from_breeding(&self, world: &Arc<World>, partner: &dyn Animal)
fn spawn_child_from_breeding(&self, world: &Arc<World>, partner: &dyn Animal)
Creates, initializes, and inserts vanilla breeding offspring.
Source§fn finalize_spawn_child_from_breeding(
&self,
world: &Arc<World>,
partner: &dyn Animal,
_offspring: Option<&dyn Animal>,
)
fn finalize_spawn_child_from_breeding( &self, world: &Arc<World>, partner: &dyn Animal, _offspring: Option<&dyn Animal>, )
Applies vanilla breeding side effects after offspring creation.
Source§fn tick_animal_love(&self)
fn tick_animal_love(&self)
Ticks vanilla animal love state.
Source§fn custom_server_ai_step_animal(&self)
fn custom_server_ai_step_animal(&self)
Runs vanilla
Animal.customServerAiStep.Source§fn remove_when_far_away_animal(&self, _dist_sqr: f64) -> bool
fn remove_when_far_away_animal(&self, _dist_sqr: f64) -> bool
Returns vanilla animal far-away despawn behavior.
Source§fn save_animal(&self, nbt: &mut NbtCompound)
fn save_animal(&self, nbt: &mut NbtCompound)
Saves vanilla animal fields.
Source§fn load_animal(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn load_animal(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
Loads vanilla animal fields.
Source§impl DowncastType for PigEntity
impl DowncastType for PigEntity
Source§const TYPE_KEY: DowncastTypeKey
const TYPE_KEY: DowncastTypeKey
The process-wide key for this concrete type.
Source§impl Entity for PigEntity
impl Entity for PigEntity
Source§fn base(&self) -> &EntityBase
fn base(&self) -> &EntityBase
Returns a reference to the entity’s shared vanilla base fields.
Source§fn entity_type(&self) -> EntityTypeRef
fn entity_type(&self) -> EntityTypeRef
Gets the entity type containing tracking range, dimensions, etc.
Source§fn dimensions_for_pose(&self, _pose: EntityPose) -> EntityDimensions
fn dimensions_for_pose(&self, _pose: EntityPose) -> EntityDimensions
Returns vanilla dimensions for a physical pose.
Source§fn controlling_passenger(&self) -> Option<SharedEntity>
fn controlling_passenger(&self) -> Option<SharedEntity>
Returns the living passenger currently controlling this entity, if any. Read more
Source§fn synced_data(&self) -> Option<&dyn EntitySyncedData>
fn synced_data(&self) -> Option<&dyn EntitySyncedData>
Returns the synchronized entity-data container for entities with vanilla data accessors.
Source§fn update_data_before_sync(&self)
fn update_data_before_sync(&self)
Updates synchronized entity data just before tracker sync. Read more
Source§fn play_step_sound(&self, _pos: BlockPos, _block_state: BlockStateId)
fn play_step_sound(&self, _pos: BlockPos, _block_state: BlockStateId)
Plays the base vanilla step sound for a block.
Source§fn save_additional(&self, nbt: &mut NbtCompound)
fn save_additional(&self, nbt: &mut NbtCompound)
Saves type-specific entity data to NBT. Read more
Source§fn load_additional(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn load_additional(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
Loads type-specific entity data from NBT. Read more
Source§fn is_always_ticking(&self) -> bool
fn is_always_ticking(&self) -> bool
Returns whether this entity ignores chunk ticking visibility. Read more
Source§fn broadcast_to_player(&self, _player: &Player) -> bool
fn broadcast_to_player(&self, _player: &Player) -> bool
Returns whether this entity should be broadcast to the given player. Read more
Source§fn scoreboard_name(&self) -> String
fn scoreboard_name(&self) -> String
Returns this entity’s vanilla scoreboard holder name. Read more
Source§fn name(&self) -> TextComponent
fn name(&self) -> TextComponent
Returns this entity’s vanilla name component before team decoration.
Source§fn display_name(&self) -> TextComponent
fn display_name(&self) -> TextComponent
Returns this entity’s vanilla display name.
Source§fn plain_text_name(&self) -> String
fn plain_text_name(&self) -> String
Returns this entity’s plain vanilla name. Read more
Source§fn nbt_for_data_compare(&self) -> NbtCompound
fn nbt_for_data_compare(&self) -> NbtCompound
Returns the vanilla-shaped entity NBT used by command predicates. Read more
Source§fn nbt_for_passenger_save(&self) -> Option<NbtCompound>
fn nbt_for_passenger_save(&self) -> Option<NbtCompound>
Returns passenger-save NBT including the entity type id.
Source§fn spawn_position(&self) -> DVec3
fn spawn_position(&self) -> DVec3
Gets the position to send in this entity’s add-entity packet. Read more
Source§fn block_position(&self) -> BlockPos
fn block_position(&self) -> BlockPos
Gets the entity’s current block position.
Source§fn in_block_state(&self, world: &World) -> BlockStateId
fn in_block_state(&self, world: &World) -> BlockStateId
Returns vanilla
Entity.getInBlockState.Source§fn old_position(&self) -> DVec3
fn old_position(&self) -> DVec3
Gets the entity position used by vanilla movement traces.
Source§fn bounding_box(&self) -> WorldAabb
fn bounding_box(&self) -> WorldAabb
Gets the entity’s bounding box for collision queries.
Source§fn is_free(&self, delta: DVec3) -> bool
fn is_free(&self, delta: DVec3) -> bool
Returns vanilla
Entity.isFree() for the current bounding box shifted by delta.Source§fn blocks_building(&self) -> bool
fn blocks_building(&self) -> bool
Returns whether this entity obstructs block placement. Read more
Source§fn is_pickable(&self) -> bool
fn is_pickable(&self) -> bool
Returns whether this entity can be targeted by picking and interaction raycasts. Read more
Source§fn attackable(&self) -> bool
fn attackable(&self) -> bool
Returns whether this entity can be attacked. Read more
Source§fn skip_attack_interaction(&self, _source: &dyn Entity) -> bool
fn skip_attack_interaction(&self, _source: &dyn Entity) -> bool
Returns whether this entity handles and consumes an attack before normal damage. Read more
Source§fn is_pushable(&self) -> bool
fn is_pushable(&self) -> bool
Returns whether this entity participates in vanilla push separation. Read more
Source§fn is_pushed_by_fluid(&self) -> bool
fn is_pushed_by_fluid(&self) -> bool
Returns whether vanilla fluid currents can push this entity.
Source§fn on_above_bubble_column(&self, drag_down: bool, _pos: BlockPos)
fn on_above_bubble_column(&self, drag_down: bool, _pos: BlockPos)
Applies vanilla
Entity.onAboveBubbleColumn.Source§fn on_inside_bubble_column(&self, drag_down: bool)
fn on_inside_bubble_column(&self, drag_down: bool)
Applies vanilla
Entity.onInsideBubbleColumn.Source§fn is_spectator(&self) -> bool
fn is_spectator(&self) -> bool
Returns whether this entity is invisible to normal entity selectors. Read more
Source§fn is_ignoring_block_triggers(&self) -> bool
fn is_ignoring_block_triggers(&self) -> bool
Returns whether this entity is excluded from pressure plates and tripwires. Read more
Source§fn piston_push_reaction(&self) -> PushReaction
fn piston_push_reaction(&self) -> PushReaction
Returns how vanilla lets this entity respond to piston movement.
Source§fn is_supported_by(&self, pos: BlockPos) -> bool
fn is_supported_by(&self, pos: BlockPos) -> bool
Returns whether this entity’s main supporting block is
pos.Source§fn can_interact_with_level(&self) -> bool
fn can_interact_with_level(&self) -> bool
Returns whether vanilla lets this entity interact with its loaded level.
Source§fn is_invisible(&self) -> bool
fn is_invisible(&self) -> bool
Returns vanilla
Entity.isInvisible().Source§fn is_discrete(&self) -> bool
fn is_discrete(&self) -> bool
Returns vanilla
Entity.isDiscrete().Source§fn is_allied_to(&self, _other: &dyn Entity) -> bool
fn is_allied_to(&self, _other: &dyn Entity) -> bool
Returns whether this entity is allied to
other.Source§fn is_marker_armor_stand(&self) -> bool
fn is_marker_armor_stand(&self) -> bool
Returns whether this entity is a marker armor stand.
Source§fn is_tame_owned_by(&self, _owner: &dyn LivingEntity) -> bool
fn is_tame_owned_by(&self, _owner: &dyn LivingEntity) -> bool
Returns whether this entity is a tameable animal owned by
owner.Source§fn projectile_owner_uuid(&self) -> Option<Uuid>
fn projectile_owner_uuid(&self) -> Option<Uuid>
Returns the vanilla
Projectile owner UUID when this entity exposes one.Source§fn projectile_owner(&self) -> Option<SharedEntity>
fn projectile_owner(&self) -> Option<SharedEntity>
Returns the live vanilla
Projectile owner when this entity exposes one.Source§fn is_flying_player(&self) -> bool
fn is_flying_player(&self) -> bool
Returns true for vanilla players whose abilities have
flying set.Source§fn can_be_collided_with(&self, _other: Option<&dyn Entity>) -> bool
fn can_be_collided_with(&self, _other: Option<&dyn Entity>) -> bool
Returns whether
other can collide with this entity. Read moreSource§fn can_be_hit_by_projectile(&self) -> bool
fn can_be_hit_by_projectile(&self) -> bool
Returns whether projectile collision may interact with this entity. Read more
Source§fn deflection(&self, _projectile: &dyn Projectile) -> ProjectileDeflection
fn deflection(&self, _projectile: &dyn Projectile) -> ProjectileDeflection
Returns this entity’s Vanilla projectile deflection behavior.
Source§fn vehicle(&self) -> Option<SharedEntity>
fn vehicle(&self) -> Option<SharedEntity>
Gets the vehicle this entity is riding, if present. Read more
Source§fn controlled_vehicle(&self) -> Option<SharedEntity>
fn controlled_vehicle(&self) -> Option<SharedEntity>
Returns the vehicle this entity directly controls, if any. Read more
Source§fn is_passenger(&self) -> bool
fn is_passenger(&self) -> bool
Returns whether this entity is riding another entity. Read more
Source§fn can_ride(&self, _vehicle: &dyn Entity) -> bool
fn can_ride(&self, _vehicle: &dyn Entity) -> bool
Returns whether vanilla allows this entity to start riding
vehicle. Read moreSource§fn stop_riding(&self)
fn stop_riding(&self)
Stops riding the current vehicle, if any. Read more
Source§fn start_riding(&self, entity_to_ride: &SharedEntity) -> bool
fn start_riding(&self, entity_to_ride: &SharedEntity) -> bool
Starts riding
entity_to_ride if vanilla boarding rules allow it. Read moreSource§fn passengers(&self) -> Vec<SharedEntity> ⓘ
fn passengers(&self) -> Vec<SharedEntity> ⓘ
Gets this entity’s direct passengers. Read more
Source§fn count_player_passengers(&self) -> usize
fn count_player_passengers(&self) -> usize
Counts indirect player passengers. Read more
Source§fn has_exactly_one_player_passenger(&self) -> bool
fn has_exactly_one_player_passenger(&self) -> bool
Returns whether this entity has exactly one indirect player passenger. Read more
Source§fn first_passenger(&self) -> Option<SharedEntity>
fn first_passenger(&self) -> Option<SharedEntity>
Gets this entity’s first direct passenger. Read more
Source§fn can_control_vehicle(&self) -> bool
fn can_control_vehicle(&self) -> bool
Returns whether this entity can control a vehicle it is riding. Read more
Source§fn has_controlling_passenger(&self) -> bool
fn has_controlling_passenger(&self) -> bool
Returns whether this entity currently has a controlling passenger. Read more
Source§fn is_vehicle(&self) -> bool
fn is_vehicle(&self) -> bool
Returns whether this entity has any direct passengers. Read more
Source§fn dismounts_underwater(&self) -> bool
fn dismounts_underwater(&self) -> bool
Returns vanilla
Entity.dismountsUnderwater.Source§fn has_passenger(&self, passenger: &dyn Entity) -> bool
fn has_passenger(&self, passenger: &dyn Entity) -> bool
Returns whether
passenger is a direct passenger of this entity. Read moreSource§fn can_add_passenger(&self, _passenger: &dyn Entity) -> bool
fn can_add_passenger(&self, _passenger: &dyn Entity) -> bool
Returns whether this entity can accept
passenger as a direct passenger. Read moreSource§fn could_accept_passenger(&self) -> bool
fn could_accept_passenger(&self) -> bool
Returns whether this entity can accept any passenger. Read more
Source§fn passenger_index(&self, passenger: &dyn Entity) -> Option<usize>
fn passenger_index(&self, passenger: &dyn Entity) -> Option<usize>
Returns the current direct passenger index for attachment lookup.
Source§fn vehicle_attachment_point(&self, _vehicle: &dyn Entity) -> DVec3
fn vehicle_attachment_point(&self, _vehicle: &dyn Entity) -> DVec3
Returns this passenger’s vehicle attachment point. Read more
Source§fn passenger_attachment_point(&self, passenger: &dyn Entity) -> DVec3
fn passenger_attachment_point(&self, passenger: &dyn Entity) -> DVec3
Returns this vehicle’s passenger attachment point. Read more
Source§fn passenger_riding_position(&self, passenger: &dyn Entity) -> DVec3
fn passenger_riding_position(&self, passenger: &dyn Entity) -> DVec3
Returns the world position where
passenger should ride this vehicle. Read moreSource§fn position_rider(&self, passenger: &dyn Entity)
fn position_rider(&self, passenger: &dyn Entity)
Repositions a direct passenger from this vehicle’s attachment point. Read more
Source§fn root_vehicle_id(&self) -> i32
fn root_vehicle_id(&self) -> i32
Returns this entity’s root vehicle ID, or this entity’s ID when it is not riding. Read more
Source§fn root_vehicle(&self) -> Option<SharedEntity>
fn root_vehicle(&self) -> Option<SharedEntity>
Returns this entity’s root vehicle, if this entity is riding one. Read more
Source§fn is_passenger_of_same_vehicle(&self, other: &dyn Entity) -> bool
fn is_passenger_of_same_vehicle(&self, other: &dyn Entity) -> bool
Returns whether this entity and
other share the same root vehicle. Read moreSource§fn has_indirect_passenger(&self, entity: &dyn Entity) -> bool
fn has_indirect_passenger(&self, entity: &dyn Entity) -> bool
Returns whether
entity is an indirect passenger of this entity. Read moreSource§fn can_collide_with(&self, other: &dyn Entity) -> bool
fn can_collide_with(&self, other: &dyn Entity) -> bool
Returns whether this entity can collide with
other. Read moreSource§fn push_impulse(&self, impulse: DVec3)
fn push_impulse(&self, impulse: DVec3)
Adds an impulse to this entity’s velocity and marks velocity for sync. Read more
Source§fn push_entity(&self, entity: &dyn Entity)
fn push_entity(&self, entity: &dyn Entity)
Applies vanilla entity-to-entity push separation. Read more
Source§fn make_bounding_box_at(&self, position: DVec3) -> WorldAabb
fn make_bounding_box_at(&self, position: DVec3) -> WorldAabb
Builds this entity’s default bounding box at
position.Source§fn get_relative_portal_position(
&self,
axis: Axis,
portal_area: FoundRectangle,
) -> DVec3
fn get_relative_portal_position( &self, axis: Axis, portal_area: FoundRectangle, ) -> DVec3
Returns vanilla
Entity.getRelativePortalPosition.Source§fn default_tick(&self)
fn default_tick(&self)
Default vanilla
Entity.tick() behavior. Read moreSource§fn ride_tick(&self)
fn ride_tick(&self)
Called every game tick while this entity is riding another entity. Read more
Source§fn handle_portal(&self)
fn handle_portal(&self)
Runs vanilla
Entity.handlePortal behavior currently implemented by Steel.Source§fn entity_base_tick(&self)
fn entity_base_tick(&self)
Runs only vanilla
Entity.baseTick behavior. Read moreSource§fn check_below_world(&self)
fn check_below_world(&self)
Applies vanilla below-world handling.
Source§fn on_below_world(&self)
fn on_below_world(&self)
Runs entity-specific behavior after falling below the world.
Source§fn check_despawn(&self)
fn check_despawn(&self)
Runs vanilla pre-tick despawn checks.
Source§fn apply_inside_block_effect(&self, effect_type: InsideBlockEffectType)
fn apply_inside_block_effect(&self, effect_type: InsideBlockEffectType)
Applies an inside-block effect queued by vanilla’s step-based collector.
Source§fn pack_dirty_entity_data(&self) -> Option<Vec<DataValue>>
fn pack_dirty_entity_data(&self) -> Option<Vec<DataValue>>
Packs dirty entity data for network synchronization. Read more
Source§fn pack_all_entity_data(&self) -> Vec<DataValue>
fn pack_all_entity_data(&self) -> Vec<DataValue>
Packs all non-default entity data for initial spawn. Read more
Source§fn is_removed(&self) -> bool
fn is_removed(&self) -> bool
Returns true if the entity has been marked for removal.
Source§fn is_alive(&self) -> bool
fn is_alive(&self) -> bool
Returns whether this entity is alive for vanilla generic entity checks.
Source§fn begin_pending_world_change(&self) -> Option<PendingWorldChangeToken>
fn begin_pending_world_change(&self) -> Option<PendingWorldChangeToken>
Marks this entity as waiting for a prepared world change.
Source§fn finish_pending_world_change(&self, token: PendingWorldChangeToken) -> bool
fn finish_pending_world_change(&self, token: PendingWorldChangeToken) -> bool
Clears a pending world change if it still matches the provided token.
Source§fn is_world_change_pending(&self) -> bool
fn is_world_change_pending(&self) -> bool
Returns true while this entity is waiting for a prepared world change.
Source§fn is_world_change_token_pending(&self, token: PendingWorldChangeToken) -> bool
fn is_world_change_token_pending(&self, token: PendingWorldChangeToken) -> bool
Returns true if the given world-change token is still pending.
Source§fn can_use_portal(&self, ignore_passenger: bool) -> bool
fn can_use_portal(&self, ignore_passenger: bool) -> bool
Returns whether this entity may enter a portal. Read more
Source§fn dimension_changing_delay(&self) -> i32
fn dimension_changing_delay(&self) -> i32
Returns vanilla’s dimension-changing portal cooldown delay in ticks. Read more
Source§fn removal_reason(&self) -> Option<RemovalReason>
fn removal_reason(&self) -> Option<RemovalReason>
Returns why this entity was removed, if it has been removed.
Source§fn set_removed(&self, reason: RemovalReason)
fn set_removed(&self, reason: RemovalReason)
Marks the entity as removed with the given reason.
Source§fn game_event(&self, event: GameEventRef)
fn game_event(&self, event: GameEventRef)
Emits a vanilla game event from this entity’s exact position.
Source§fn kill(&self, world: &World)
fn kill(&self, world: &World)
Kills this entity using vanilla’s living/non-living class split. Read more
Source§fn restore_owner_reference(&self, _owner: &SharedEntity)
fn restore_owner_reference(&self, _owner: &SharedEntity)
Caches a live owner reference after restoring persisted owner-linked
entities. Most entities do not store owner references.
Source§fn set_level_callback(&self, callback: Arc<dyn EntityLevelCallback>)
fn set_level_callback(&self, callback: Arc<dyn EntityLevelCallback>)
Sets the level callback for lifecycle events (movement, removal).
Source§fn notify_leash_holder(&self, _leashable: &dyn Entity)
fn notify_leash_holder(&self, _leashable: &dyn Entity)
Called by leashables while this entity is their live leash holder.
Source§fn notify_leashee_removed(&self, _leashable: &dyn Entity)
fn notify_leashee_removed(&self, _leashable: &dyn Entity)
Called when a leashable stops using this entity as its live leash holder.
Source§fn player_touch(self: Arc<Self>, _player: &Arc<Player>)
fn player_touch(self: Arc<Self>, _player: &Arc<Player>)
Called when a player touches this entity during nearby pickup processing.
Source§fn leashables_leashed_to(&self) -> Vec<SharedEntity> ⓘ
fn leashables_leashed_to(&self) -> Vec<SharedEntity> ⓘ
Finds leashable mobs in vanilla’s nearby leash scan whose holder is this entity.
Source§fn leashables_leashed_to_holder_in_area(
&self,
holder: &dyn Entity,
) -> Vec<SharedEntity> ⓘ
fn leashables_leashed_to_holder_in_area( &self, holder: &dyn Entity, ) -> Vec<SharedEntity> ⓘ
Finds leashable mobs in this entity’s nearby leash scan whose holder is
holder.Source§fn transfer_leashables_from_holder(&self, old_holder: &dyn Entity) -> bool
fn transfer_leashables_from_holder(&self, old_holder: &dyn Entity) -> bool
Transfers leashables currently held by
old_holder to this entity.Source§fn drop_all_leash_connections(&self, player: Option<&Player>) -> bool
fn drop_all_leash_connections(&self, player: Option<&Player>) -> bool
Drops this entity’s leash and all leashables attached to it.
Source§fn shear_off_all_leash_connections(&self, player: Option<&Player>) -> bool
fn shear_off_all_leash_connections(&self, player: Option<&Player>) -> bool
Shears off all leash connections reachable from this entity.
Source§fn attempt_to_shear_equipment(
&self,
player: &Player,
hand: InteractionHand,
) -> bool
fn attempt_to_shear_equipment( &self, player: &Player, hand: InteractionHand, ) -> bool
Runs vanilla
Entity.attemptToShearEquipment.Source§fn interact(
&self,
player: &Player,
hand: InteractionHand,
location: DVec3,
) -> InteractionResult
fn interact( &self, player: &Player, hand: InteractionHand, location: DVec3, ) -> InteractionResult
Handles vanilla entity right-click interaction.
Source§fn interact_entity(
&self,
player: &Player,
hand: InteractionHand,
_location: DVec3,
) -> InteractionResult
fn interact_entity( &self, player: &Player, hand: InteractionHand, _location: DVec3, ) -> InteractionResult
Handles shared vanilla
Entity.interact behavior.Source§fn is_living_entity(&self) -> bool
fn is_living_entity(&self) -> bool
Returns true for entities that implement vanilla living-entity behavior.
Source§fn is_abstract_arrow(&self) -> bool
fn is_abstract_arrow(&self) -> bool
Returns whether this entity belongs to vanilla’s
AbstractArrow hierarchy.Source§fn as_projectile(&self) -> Option<&dyn Projectile>
fn as_projectile(&self) -> Option<&dyn Projectile>
Returns this entity as a projectile when it has projectile behavior.
Source§fn as_living_entity(&self) -> Option<&dyn LivingEntity>
fn as_living_entity(&self) -> Option<&dyn LivingEntity>
Returns this entity as a living entity when it has living behavior. Read more
Source§fn as_item_frame(&self) -> Option<&dyn ItemFrame>
fn as_item_frame(&self) -> Option<&dyn ItemFrame>
Returns this entity as an item frame when it has item-frame behavior. Read more
Source§fn as_player(&self) -> Option<&Player>
fn as_player(&self) -> Option<&Player>
Returns this entity as a player when it is the concrete server player.
Source§fn with_weapon_item(&self, visitor: &mut dyn FnMut(Option<&ItemStack>))
fn with_weapon_item(&self, visitor: &mut dyn FnMut(Option<&ItemStack>))
Visits vanilla
Entity.getWeaponItem without copying inventory state.Source§fn is_pathfinder_mob(&self) -> bool
fn is_pathfinder_mob(&self) -> bool
Returns true for mobs with pathfinding navigation.
Source§fn as_pathfinder_mob(&self) -> Option<&dyn PathfinderMob>
fn as_pathfinder_mob(&self) -> Option<&dyn PathfinderMob>
Returns this entity as a pathfinder mob when it has pathfinding behavior. Read more
Source§fn as_mob(&self) -> Option<&dyn Mob>
fn as_mob(&self) -> Option<&dyn Mob>
Returns this entity as a mob when it has mob behavior. Read more
Source§fn as_animal(&self) -> Option<&dyn Animal>
fn as_animal(&self) -> Option<&dyn Animal>
Returns this entity as an animal when it has animal behavior. Read more
Source§fn is_ageable_mob(&self) -> bool
fn is_ageable_mob(&self) -> bool
Returns true for entities that implement vanilla ageable-mob behavior.
Source§fn as_ageable_mob(&self) -> Option<&dyn AgeableMob>
fn as_ageable_mob(&self) -> Option<&dyn AgeableMob>
Returns this entity as an ageable mob when it has ageable behavior. Read more
Source§fn is_item_steerable(&self) -> bool
fn is_item_steerable(&self) -> bool
Returns true for entities that implement vanilla item-steered boosts.
Source§fn as_item_steerable(&self) -> Option<&dyn ItemSteerable>
fn as_item_steerable(&self) -> Option<&dyn ItemSteerable>
Returns this entity as item steerable when it has item-steering behavior. Read more
Source§fn forces_fall_flying_velocity_sync(&self) -> bool
fn forces_fall_flying_velocity_sync(&self) -> bool
Returns true when vanilla
ServerEntity should force velocity sync for fall flying.Source§fn uses_client_movement_packets(&self) -> bool
fn uses_client_movement_packets(&self) -> bool
Returns true when movement is driven by serverbound movement packets.
Source§fn is_server_driven_movement(&self) -> bool
fn is_server_driven_movement(&self) -> bool
Returns true when normal server ticks drive this entity’s movement.
Source§fn can_simulate_movement(&self) -> bool
fn can_simulate_movement(&self) -> bool
Returns true when vanilla allows this side to apply movement simulation side effects.
Source§fn is_effective_ai(&self) -> bool
fn is_effective_ai(&self) -> bool
Returns true when vanilla allows this side to run entity AI/travel logic.
Source§fn is_suppressing_bounce(&self) -> bool
fn is_suppressing_bounce(&self) -> bool
Returns true when vanilla landing bounce should be suppressed.
Source§fn is_stepping_carefully(&self) -> bool
fn is_stepping_carefully(&self) -> bool
Returns true when vanilla block step-on hooks should treat this entity as careful.
Source§fn is_descending(&self) -> bool
fn is_descending(&self) -> bool
Returns true when vanilla collision context should treat the entity as descending.
Sets the vanilla shift-key-down shared flag.
Sets the vanilla swimming shared flag.
Source§fn update_swimming(&self)
fn update_swimming(&self)
Updates the vanilla swimming shared flag. Read more
Source§fn default_update_swimming(&self)
fn default_update_swimming(&self)
Shared body of vanilla
Entity.updateSwimming for player overrides.Sets the vanilla sprinting shared flag.
Sets the vanilla fall-flying shared flag.
Source§fn is_flying_vehicle(&self) -> bool
fn is_flying_vehicle(&self) -> bool
Returns whether vanilla excludes this vehicle from floating kicks.
Source§fn on_climbable(&self) -> bool
fn on_climbable(&self) -> bool
Returns true if vanilla rules consider this entity to be on a climbable block.
Source§fn known_movement(&self) -> DVec3
fn known_movement(&self) -> DVec3
Returns the movement vector vanilla exposes for block-contact logic.
Source§fn known_speed(&self) -> DVec3
fn known_speed(&self) -> DVec3
Returns the base-tick displacement vanilla exposes as
getKnownSpeed.Source§fn tick_count(&self) -> i32
fn tick_count(&self) -> i32
Returns vanilla
Entity.tickCount.Source§fn advance_tick_count(&self)
fn advance_tick_count(&self)
Advances vanilla
Entity.tickCount.Source§fn fall_sounds(&self) -> (SoundEventRef, SoundEventRef)
fn fall_sounds(&self) -> (SoundEventRef, SoundEventRef)
Returns vanilla small and big fall sounds for this entity.
Source§fn rotation(&self) -> (f32, f32)
fn rotation(&self) -> (f32, f32)
Gets the entity’s rotation as (yaw, pitch) in degrees. Read more
Source§fn set_rotation(&self, rotation: (f32, f32))
fn set_rotation(&self, rotation: (f32, f32))
Sets the entity’s rotation as (yaw, pitch) in degrees.
Source§fn direction_yaw(&self) -> Direction
fn direction_yaw(&self) -> Direction
Gets the nearest horizontal direction to the entity’s yaw (horizontal rotation).
Source§fn look_at(&self, from_anchor: EntityAnchor, target: DVec3)
fn look_at(&self, from_anchor: EntityAnchor, target: DVec3)
Rotates this entity to face a fixed position.
Source§fn look_at_entity(
&self,
from_anchor: EntityAnchor,
target: &dyn Entity,
target_anchor: EntityAnchor,
)
fn look_at_entity( &self, from_anchor: EntityAnchor, target: &dyn Entity, target_anchor: EntityAnchor, )
Rotates this entity to follow an anchored point on another entity.
Source§fn spawn_data(&self) -> i32
fn spawn_data(&self) -> i32
Extra spawn-packet data used by vanilla for entity-specific construction.
Source§fn get_eye_height(&self) -> f64
fn get_eye_height(&self) -> f64
Gets the eye height for this entity. Read more
Source§fn get_fluid_jump_threshold(&self) -> f64
fn get_fluid_jump_threshold(&self) -> f64
Returns vanilla
Entity.getFluidJumpThreshold().Source§fn is_in_wall(&self) -> bool
fn is_in_wall(&self) -> bool
Mirrors vanilla
Entity.isInWall.Source§fn calculate_view_vector(&self, pitch_degrees: f32, yaw_degrees: f32) -> DVec3
fn calculate_view_vector(&self, pitch_degrees: f32, yaw_degrees: f32) -> DVec3
Calculates vanilla
Entity.calculateViewVector().Source§fn look_angle(&self) -> DVec3
fn look_angle(&self) -> DVec3
Returns vanilla
Entity.getLookAngle().Source§fn hand_holding_item_angle(&self, item: ItemRef) -> DVec3
fn hand_holding_item_angle(&self, item: ItemRef) -> DVec3
Returns the vanilla offset for the hand holding
item. Read moreSource§fn set_velocity(&self, velocity: DVec3)
fn set_velocity(&self, velocity: DVec3)
Sets the entity’s velocity.
Source§fn needs_velocity_sync(&self) -> bool
fn needs_velocity_sync(&self) -> bool
Returns true when vanilla
ServerEntity should consider sending velocity.Source§fn mark_velocity_sync(&self)
fn mark_velocity_sync(&self)
Marks velocity for vanilla
ServerEntity synchronization.Source§fn clear_velocity_sync(&self)
fn clear_velocity_sync(&self)
Clears the vanilla velocity sync marker after send processing.
Source§fn hurt_marked(&self) -> bool
fn hurt_marked(&self) -> bool
Returns true when vanilla hurt-marked velocity sync is pending.
Source§fn clear_hurt_mark(&self)
fn clear_hurt_mark(&self)
Clears the vanilla hurt-marked motion sync flag.
Source§fn fall_distance(&self) -> f64
fn fall_distance(&self) -> f64
Returns accumulated vanilla fall distance.
Source§fn is_in_powder_snow(&self) -> bool
fn is_in_powder_snow(&self) -> bool
Returns whether this entity is currently inside powder snow.
Source§fn was_in_powder_snow(&self) -> bool
fn was_in_powder_snow(&self) -> bool
Returns whether this entity was inside powder snow during the previous base tick.
Source§fn set_fall_distance(&self, fall_distance: f64)
fn set_fall_distance(&self, fall_distance: f64)
Sets accumulated vanilla fall distance.
Source§fn reset_fall_distance(&self)
fn reset_fall_distance(&self)
Resets accumulated vanilla fall distance.
Source§fn check_fall_distance_accumulation(&self)
fn check_fall_distance_accumulation(&self)
Mirrors vanilla
Entity.checkFallDistanceAccumulation().Source§fn fire_freeze_state(&self) -> EntityFireFreezeState
fn fire_freeze_state(&self) -> EntityFireFreezeState
Returns the current vanilla fire/freeze state.
Source§fn remaining_fire_ticks(&self) -> i32
fn remaining_fire_ticks(&self) -> i32
Returns vanilla
remainingFireTicks.Source§fn set_remaining_fire_ticks(&self, remaining_fire_ticks: i32)
fn set_remaining_fire_ticks(&self, remaining_fire_ticks: i32)
Sets vanilla
remainingFireTicks.Source§fn ticks_frozen(&self) -> i32
fn ticks_frozen(&self) -> i32
Returns synchronized vanilla
TicksFrozen.Source§fn set_ticks_frozen(&self, ticks_frozen: i32)
fn set_ticks_frozen(&self, ticks_frozen: i32)
Sets synchronized vanilla
TicksFrozen.Source§fn fire_immune(&self) -> bool
fn fire_immune(&self) -> bool
Returns whether this entity is immune to fire effects and fire damage.
Source§fn fire_immune_ticks(&self) -> i32
fn fire_immune_ticks(&self) -> i32
Returns vanilla fire immunity cooldown ticks after not being ignited.
Source§fn should_play_lava_hurt_sound(&self) -> bool
fn should_play_lava_hurt_sound(&self) -> bool
Returns whether vanilla should play this entity’s lava hurt sound.
Source§fn remaining_fire_ticks_cap(&self) -> Option<i32>
fn remaining_fire_ticks_cap(&self) -> Option<i32>
Maximum vanilla
remainingFireTicks this entity can store.Source§fn fire_ignite_extra_ticks(&self) -> i32
fn fire_ignite_extra_ticks(&self) -> i32
Returns extra ticks added by fire-block ignition before 8-second ignition.
Source§fn is_on_fire(&self) -> bool
fn is_on_fire(&self) -> bool
Returns whether the entity is on fire on the server.
Source§fn has_visual_fire(&self) -> bool
fn has_visual_fire(&self) -> bool
Returns vanilla
hasVisualFire.Source§fn is_freezing(&self) -> bool
fn is_freezing(&self) -> bool
Returns whether the entity has any frozen ticks.
Source§fn default_can_freeze(&self) -> bool
fn default_can_freeze(&self) -> bool
Returns vanilla
Entity.canFreeze() without living-equipment overrides.Source§fn can_freeze(&self) -> bool
fn can_freeze(&self) -> bool
Returns whether this entity may accumulate frozen ticks.
Source§fn ticks_required_to_freeze(&self) -> i32
fn ticks_required_to_freeze(&self) -> i32
Returns vanilla
getTicksRequiredToFreeze.Source§fn is_fully_frozen(&self) -> bool
fn is_fully_frozen(&self) -> bool
Returns whether this entity has reached full-freeze duration.
Source§fn percent_frozen(&self) -> f32
fn percent_frozen(&self) -> f32
Returns vanilla
Entity.getPercentFrozen.Source§fn clear_freeze(&self)
fn clear_freeze(&self)
Clears accumulated freezing.
Source§fn clear_fire(&self)
fn clear_fire(&self)
Clears fire without resetting the vanilla fire immunity cooldown.
Source§fn ignite_for_ticks(&self, number_of_ticks: i32)
fn ignite_for_ticks(&self, number_of_ticks: i32)
Ignites this entity for a vanilla tick duration.
Source§fn sync_base_fire_freeze_entity_data(&self)
fn sync_base_fire_freeze_entity_data(&self)
Projects base fire/freeze state into generated synced entity data.
Source§fn sync_base_entity_data(&self)
fn sync_base_entity_data(&self)
Projects all base-owned synchronized fields into generated entity data.
Source§fn is_in_water(&self) -> bool
fn is_in_water(&self) -> bool
Returns true if this entity is currently touching water.
Source§fn is_in_lava(&self) -> bool
fn is_in_lava(&self) -> bool
Returns true if this entity is currently touching lava.
Source§fn is_eye_in_water(&self) -> bool
fn is_eye_in_water(&self) -> bool
Returns true if this entity’s eyes are currently inside water.
Source§fn is_eye_in_lava(&self) -> bool
fn is_eye_in_lava(&self) -> bool
Returns true if this entity’s eyes are currently inside lava.
Source§fn is_under_water(&self) -> bool
fn is_under_water(&self) -> bool
Returns vanilla underwater state.
Source§fn fluid_contact(&self) -> EntityFluidContact
fn fluid_contact(&self) -> EntityFluidContact
Returns cached fluid contact from the last entity fluid refresh.
Source§fn refresh_fluid_contact(&self) -> EntityFluidContact
fn refresh_fluid_contact(&self) -> EntityFluidContact
Refreshes cached fluid contact from this entity’s current bounding box.
Source§fn refresh_fluid_contact_for_base_tick(&self) -> EntityFluidContact
fn refresh_fluid_contact_for_base_tick(&self) -> EntityFluidContact
Refreshes cached fluid contact with vanilla base-tick eye-water history.
Source§fn scan_and_store_fluid_contact(
&self,
advance_eye_water_history: bool,
) -> EntityFluidContact
fn scan_and_store_fluid_contact( &self, advance_eye_water_history: bool, ) -> EntityFluidContact
Scans current fluid contact and stores it on the entity base.
Source§fn apply_fluid_current_for_base_tick(
&self,
world: &Arc<World>,
contact: EntityFluidContact,
)
fn apply_fluid_current_for_base_tick( &self, world: &Arc<World>, contact: EntityFluidContact, )
Applies vanilla water/lava current impulses from the base-tick fluid scan.
Source§fn apply_fluid_current_impulse(&self, impulse: DVec3)
fn apply_fluid_current_impulse(&self, impulse: DVec3)
Applies a non-zero fluid current impulse and marks velocity sync.
Source§fn is_fall_damage_immune(&self) -> bool
fn is_fall_damage_immune(&self) -> bool
Returns true if this entity type ignores vanilla fall damage.
Source§fn propagate_fall_to_passengers(
&self,
fall_distance: f64,
damage_modifier: f32,
source: &DamageSource,
)
fn propagate_fall_to_passengers( &self, fall_distance: f64, damage_modifier: f32, source: &DamageSource, )
Propagates vanilla fall-damage handling to passengers.
Source§fn cause_fall_damage(
&self,
fall_distance: f64,
damage_modifier: f32,
source: &DamageSource,
) -> bool
fn cause_fall_damage( &self, fall_distance: f64, damage_modifier: f32, source: &DamageSource, ) -> bool
Applies vanilla fall damage. Read more
Source§fn horizontal_collision(&self) -> bool
fn horizontal_collision(&self) -> bool
Returns true if the last movement was clipped horizontally.
Source§fn vertical_collision(&self) -> bool
fn vertical_collision(&self) -> bool
Returns true if the last movement was clipped vertically.
Source§fn vertical_collision_below(&self) -> bool
fn vertical_collision_below(&self) -> bool
Returns true if the last vertical collision was below the entity.
Source§fn no_physics(&self) -> bool
fn no_physics(&self) -> bool
Returns true when movement bypasses collision physics.
Source§fn is_affected_by_blocks(&self) -> bool
fn is_affected_by_blocks(&self) -> bool
Returns true when vanilla block-contact effects may run for this entity.
Source§fn set_no_physics(&self, no_physics: bool)
fn set_no_physics(&self, no_physics: bool)
Sets whether this entity bypasses collision physics.
Source§fn update_no_physics_from_current_collision(&self)
fn update_no_physics_from_current_collision(&self)
Updates item-style
noPhysics from the entity’s current collision state.Source§fn move_towards_closest_space(&self, x: f64, y: f64, z: f64)
fn move_towards_closest_space(&self, x: f64, y: f64, z: f64)
Nudges velocity toward the closest non-full collision block.
Source§fn default_make_stuck_in_block(
&self,
_state: BlockStateId,
speed_multiplier: DVec3,
)
fn default_make_stuck_in_block( &self, _state: BlockStateId, speed_multiplier: DVec3, )
Default vanilla stuck-in-block movement for the next movement pass.
Source§fn make_stuck_in_block(&self, state: BlockStateId, speed_multiplier: DVec3)
fn make_stuck_in_block(&self, state: BlockStateId, speed_multiplier: DVec3)
Applies vanilla stuck-in-block movement for the next movement pass.
Source§fn apply_effects_from_blocks(&self)
fn apply_effects_from_blocks(&self)
Applies current block-contact effects to this entity. Read more
Source§fn apply_effects_from_blocks_between(&self, from: DVec3, to: DVec3)
fn apply_effects_from_blocks_between(&self, from: DVec3, to: DVec3)
Applies block-contact effects for one explicit movement segment. Read more
Source§fn apply_effects_from_blocks_for_last_movements(&self)
fn apply_effects_from_blocks_for_last_movements(&self)
Replays the last finalized block-contact movement list.
Source§fn set_on_ground(&self, on_ground: bool)
fn set_on_ground(&self, on_ground: bool)
Sets whether the entity is on the ground.
Source§fn set_on_ground_with_movement(
&self,
on_ground: bool,
horizontal_collision: bool,
movement: DVec3,
)
fn set_on_ground_with_movement( &self, on_ground: bool, horizontal_collision: bool, movement: DVec3, )
Sets ground and horizontal collision flags from accepted movement.
Source§fn default_apply_accepted_client_movement(
&self,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn default_apply_accepted_client_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Default final state application for accepted client-authored movement. Read more
Source§fn apply_accepted_client_movement(
&self,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn apply_accepted_client_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Applies final state accepted from a client-authored movement packet.
Source§fn apply_accepted_client_vehicle_movement(
&self,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn apply_accepted_client_vehicle_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Applies final state accepted from a controlled-vehicle movement packet.
Source§fn try_set_position(&self, pos: DVec3) -> Result<(), EntityMoveError>
fn try_set_position(&self, pos: DVec3) -> Result<(), EntityMoveError>
Attempts to set the entity’s position through world lifecycle validation.
Source§fn set_old_position_to_current(&self)
fn set_old_position_to_current(&self)
Sets the vanilla movement-trace old position to the current position.
Source§fn set_old_position(&self, old_position: DVec3)
fn set_old_position(&self, old_position: DVec3)
Sets the vanilla movement-trace old position explicitly.
Source§fn remove_latest_movement_recording(&self)
fn remove_latest_movement_recording(&self)
Removes the latest movement segment recorded this tick.
Source§fn on_pos(&self, offset: f32) -> Option<BlockPos>
fn on_pos(&self, offset: f32) -> Option<BlockPos>
Returns the block position this entity is standing on.
Source§fn block_pos_below_that_affects_movement(&self) -> Option<BlockPos>
fn block_pos_below_that_affects_movement(&self) -> Option<BlockPos>
Returns the block position used for movement-affecting block properties.
Source§fn on_pos_legacy(&self) -> Option<BlockPos>
fn on_pos_legacy(&self) -> Option<BlockPos>
Returns vanilla
getOnPosLegacy(), used by fall/step block hooks.Source§fn block_speed_factor(&self) -> f32
fn block_speed_factor(&self) -> f32
Returns the vanilla block speed factor applied after movement.
Source§fn block_jump_factor(&self) -> f32
fn block_jump_factor(&self) -> f32
Returns vanilla
Entity.getBlockJumpFactor().Source§fn refresh_dimensions(&self)
fn refresh_dimensions(&self)
Refreshes dimensions for the current physical pose.
Source§fn is_crouching(&self) -> bool
fn is_crouching(&self) -> bool
Returns whether vanilla currently considers this entity crouching.
Source§fn is_swimming(&self) -> bool
fn is_swimming(&self) -> bool
Returns whether vanilla currently considers this entity swimming.
Source§fn is_on_rails(&self) -> bool
fn is_on_rails(&self) -> bool
Returns whether this entity is on rails.
Source§fn is_state_climbable(&self, state: BlockStateId) -> bool
fn is_state_climbable(&self, state: BlockStateId) -> bool
Returns whether a block state is climbable for base movement effects.
Source§fn movement_emission(&self) -> EntityMovementEmission
fn movement_emission(&self) -> EntityMovementEmission
Returns vanilla movement side effects emitted by this entity.
Source§fn may_interact(&self, _world: &World, _pos: BlockPos) -> bool
fn may_interact(&self, _world: &World, _pos: BlockPos) -> bool
Returns whether this entity may modify the world at a position. Read more
Source§fn air_supply(&self) -> i32
fn air_supply(&self) -> i32
Returns the synchronized vanilla
Air value.Source§fn set_air_supply(&self, air_supply: i32)
fn set_air_supply(&self, air_supply: i32)
Sets the synchronized vanilla
Air value.Source§fn max_air_supply(&self) -> i32
fn max_air_supply(&self) -> i32
Returns this entity’s maximum vanilla air supply.
Source§fn portal_cooldown(&self) -> i32
fn portal_cooldown(&self) -> i32
Returns the vanilla portal cooldown in ticks.
Source§fn set_portal_cooldown(&self, portal_cooldown: i32)
fn set_portal_cooldown(&self, portal_cooldown: i32)
Sets the vanilla portal cooldown in ticks.
Source§fn is_on_portal_cooldown(&self) -> bool
fn is_on_portal_cooldown(&self) -> bool
Returns whether the entity is on vanilla portal cooldown.
Source§fn reset_portal_cooldown(&self)
fn reset_portal_cooldown(&self)
Resets vanilla portal cooldown to this entity’s dimension-changing delay. Read more
Source§fn set_as_inside_portal(&self, portal: PortalKind, entry_position: BlockPos)
fn set_as_inside_portal(&self, portal: PortalKind, entry_position: BlockPos)
Marks this entity as inside a vanilla portal during the current tick. Read more
Source§fn custom_name(&self) -> Option<TextComponent>
fn custom_name(&self) -> Option<TextComponent>
Returns this entity’s optional vanilla custom name.
Source§fn set_custom_name(&self, custom_name: Option<TextComponent>)
fn set_custom_name(&self, custom_name: Option<TextComponent>)
Sets this entity’s optional vanilla custom name.
Source§fn is_custom_name_visible(&self) -> bool
fn is_custom_name_visible(&self) -> bool
Returns whether vanilla renders this entity’s custom name.
Source§fn set_custom_name_visible(&self, visible: bool)
fn set_custom_name_visible(&self, visible: bool)
Sets whether vanilla renders this entity’s custom name.
Source§fn has_glowing_tag(&self) -> bool
fn has_glowing_tag(&self) -> bool
Returns whether this entity has the server-owned vanilla glowing tag.
Source§fn set_glowing_tag(&self, glowing: bool)
fn set_glowing_tag(&self, glowing: bool)
Sets this entity’s server-owned vanilla glowing tag.
Returns a snapshot of this entity’s vanilla scoreboard tags.
Source§fn remove_tag(&self, tag: &str) -> bool
fn remove_tag(&self, tag: &str) -> bool
Removes a vanilla scoreboard tag.
Source§fn custom_data(&self) -> NbtCompound
fn custom_data(&self) -> NbtCompound
Returns a snapshot of this entity’s vanilla custom data.
Source§fn set_custom_data(&self, custom_data: NbtCompound)
fn set_custom_data(&self, custom_data: NbtCompound)
Replaces this entity’s vanilla custom data.
Source§fn sound_source(&self) -> SoundSource
fn sound_source(&self) -> SoundSource
Returns this entity’s vanilla sound source category.
Source§fn swim_sound(&self) -> SoundEventRef
fn swim_sound(&self) -> SoundEventRef
Returns this entity’s vanilla swim sound.
Source§fn set_silent(&self, silent: bool)
fn set_silent(&self, silent: bool)
Sets whether sounds from this entity are suppressed.
Source§fn broadcast_entity_event(&self, event: EntityStatus)
fn broadcast_entity_event(&self, event: EntityStatus)
Broadcasts a vanilla entity event/status packet near this entity.
Source§fn play_sound(&self, sound: SoundEventRef, volume: f32, pitch: f32)
fn play_sound(&self, sound: SoundEventRef, volume: f32, pitch: f32)
Plays an entity sound at the entity’s exact position.
Source§fn play_entity_on_fire_extinguished_sound(&self)
fn play_entity_on_fire_extinguished_sound(&self)
Plays vanilla’s extinguished-on-fire entity sound.
Source§fn play_block_step_sound(&self, block_state: BlockStateId)
fn play_block_step_sound(&self, block_state: BlockStateId)
Plays a vanilla block step sound at this entity’s current position.
Source§fn play_muffled_step_sound(&self, block_state: BlockStateId)
fn play_muffled_step_sound(&self, block_state: BlockStateId)
Plays vanilla’s muffled secondary step sound.
Source§fn play_combination_step_sounds(
&self,
primary_step_sound: BlockStateId,
secondary_step_sound: BlockStateId,
)
fn play_combination_step_sounds( &self, primary_step_sound: BlockStateId, secondary_step_sound: BlockStateId, )
Plays vanilla’s combination primary and secondary step sounds.
Source§fn walking_step_sound(&self, pos: BlockPos, block_state: BlockStateId)
fn walking_step_sound(&self, pos: BlockPos, block_state: BlockStateId)
Plays vanilla walking step sounds, including amethyst chimes.
Source§fn play_amethyst_step_sound(&self)
fn play_amethyst_step_sound(&self)
Plays vanilla amethyst step chime when its cooldown permits it.
Source§fn water_swim_sound(&self)
fn water_swim_sound(&self)
Plays vanilla swim sound from movement emission.
Source§fn play_swim_sound(&self, volume: f32)
fn play_swim_sound(&self, volume: f32)
Plays this entity’s swim sound at the given volume.
Source§fn is_flapping(&self) -> bool
fn is_flapping(&self) -> bool
Returns whether the entity is currently flapping.
Source§fn process_flapping_movement(&self)
fn process_flapping_movement(&self)
Processes vanilla flap movement side effects.
Source§fn next_step(&self) -> f32
fn next_step(&self) -> f32
Returns the next step threshold after movement side effects are produced.
Source§fn apply_movement_emission_and_play_sound(
&self,
emission: EntityMovementEmission,
clipped_movement: DVec3,
effect_pos: BlockPos,
effect_state: BlockStateId,
)
fn apply_movement_emission_and_play_sound( &self, emission: EntityMovementEmission, clipped_movement: DVec3, effect_pos: BlockPos, effect_state: BlockStateId, )
Applies vanilla movement sounds and game events after a completed move.
Source§fn apply_movement_side_effects_after_move(
&self,
world: &World,
actual_movement: DVec3,
)
fn apply_movement_side_effects_after_move( &self, world: &World, actual_movement: DVec3, )
Applies movement side effects after vanilla collision and landing updates.
Source§fn vibration_and_sound_effects_from_block(
&self,
pos: BlockPos,
block_state: BlockStateId,
should_sound: bool,
should_vibrate: bool,
clipped_movement: DVec3,
) -> bool
fn vibration_and_sound_effects_from_block( &self, pos: BlockPos, block_state: BlockStateId, should_sound: bool, should_vibrate: bool, clipped_movement: DVec3, ) -> bool
Emits step side effects from a candidate movement-effect block.
Source§fn max_up_step(&self) -> f32
fn max_up_step(&self) -> f32
Maximum height this entity can step up during normal movement.
Source§fn backs_off_from_edge(&self) -> bool
fn backs_off_from_edge(&self) -> bool
Whether movement should apply player-style sneak edge prevention.
Source§fn get_default_gravity(&self) -> f64
fn get_default_gravity(&self) -> f64
Gets the default gravity for this entity type. Read more
Source§fn is_no_gravity(&self) -> bool
fn is_no_gravity(&self) -> bool
Returns true if gravity is disabled for this entity.
Source§fn set_no_gravity(&self, no_gravity: bool)
fn set_no_gravity(&self, no_gravity: bool)
Sets the shared vanilla
NoGravity flag.Source§fn is_invulnerable(&self) -> bool
fn is_invulnerable(&self) -> bool
Returns the shared vanilla
Invulnerable flag.Source§fn set_invulnerable(&self, invulnerable: bool)
fn set_invulnerable(&self, invulnerable: bool)
Sets the shared vanilla
Invulnerable flag.Source§fn get_gravity(&self) -> f64
fn get_gravity(&self) -> f64
Gets the current gravity value. Read more
Source§fn apply_gravity(&self)
fn apply_gravity(&self)
Applies gravity to the entity’s velocity. Read more
Source§fn move_relative(&self, speed: f32, input: DVec3)
fn move_relative(&self, speed: f32, input: DVec3)
Applies vanilla
Entity.moveRelative().Source§fn move_without_physics(&self, delta: DVec3) -> Option<MoveResult>
fn move_without_physics(&self, delta: DVec3) -> Option<MoveResult>
Moves the entity without collision physics.
Source§fn move_entity(&self, mover_type: MoverType, delta: DVec3) -> Option<MoveResult>
fn move_entity(&self, mover_type: MoverType, delta: DVec3) -> Option<MoveResult>
Moves the entity with collision detection. Read more
Source§fn apply_fall_damage_after_move(
&self,
result: &MoveResult,
world: &Arc<World>,
) -> bool
fn apply_fall_damage_after_move( &self, result: &MoveResult, world: &Arc<World>, ) -> bool
Applies vanilla fall-distance bookkeeping after accepted movement.
Source§fn reset_fall_distance_on_resetting_clip(
&self,
world: &Arc<World>,
movement: DVec3,
)
fn reset_fall_distance_on_resetting_clip( &self, world: &Arc<World>, movement: DVec3, )
Resets fall distance when vanilla’s fall-damage-resetting clip hits.
Source§fn do_check_fall_damage(
&self,
movement: DVec3,
on_ground: bool,
world: &Arc<World>,
) -> bool
fn do_check_fall_damage( &self, movement: DVec3, on_ground: bool, world: &Arc<World>, ) -> bool
Mirrors vanilla
Entity.doCheckFallDamage. Read moreSource§fn refresh_supporting_block_for_fall_damage(
&self,
movement: DVec3,
on_ground: bool,
)
fn refresh_supporting_block_for_fall_damage( &self, movement: DVec3, on_ground: bool, )
Refreshes vanilla supporting-block state before fall-damage side effects.
Source§fn check_fall_damage(
&self,
vertical_movement: f64,
on_ground: bool,
on_state: BlockStateId,
pos: BlockPos,
world: &Arc<World>,
)
fn check_fall_damage( &self, vertical_movement: f64, on_ground: bool, on_state: BlockStateId, pos: BlockPos, world: &Arc<World>, )
Mirrors vanilla
Entity.checkFallDamage.Source§fn ground_contact_after_movement(
&self,
on_ground: bool,
movement: Option<DVec3>,
) -> EntityGroundContact
fn ground_contact_after_movement( &self, on_ground: bool, movement: Option<DVec3>, ) -> EntityGroundContact
Computes vanilla support state for an on-ground update.
Source§fn check_supporting_block(
&self,
on_ground: bool,
movement: Option<DVec3>,
world: &Arc<World>,
) -> EntityGroundContact
fn check_supporting_block( &self, on_ground: bool, movement: Option<DVec3>, world: &Arc<World>, ) -> EntityGroundContact
Mirrors vanilla
Entity.checkSupportingBlock.Source§fn spawn_at_location(
&self,
item: ItemStack,
y_offset: f64,
) -> Option<Arc<ItemEntity>>
fn spawn_at_location( &self, item: ItemStack, y_offset: f64, ) -> Option<Arc<ItemEntity>>
Spawns an item at this entity’s location. Read more
Source§fn spawn_at_location_with_offset(
&self,
item: ItemStack,
offset: DVec3,
) -> Option<Arc<ItemEntity>>
fn spawn_at_location_with_offset( &self, item: ItemStack, offset: DVec3, ) -> Option<Arc<ItemEntity>>
Spawns an item at this entity’s location plus a vanilla attachment offset.
Source§impl ItemSteerable for PigEntity
impl ItemSteerable for PigEntity
Source§fn item_based_steering(&self) -> &SyncMutex<ItemBasedSteering>
fn item_based_steering(&self) -> &SyncMutex<ItemBasedSteering>
Returns the shared runtime steering state.
Source§fn boost_time_total(&self) -> i32
fn boost_time_total(&self) -> i32
Returns the synced vanilla
boostTimeTotal.Source§fn set_boost_time_total(&self, boost_time_total: i32)
fn set_boost_time_total(&self, boost_time_total: i32)
Sets the synced vanilla
boostTimeTotal.Source§fn tick_boost(&self)
fn tick_boost(&self)
Advances the active item-steering boost.
Source§fn boost_factor(&self) -> f32
fn boost_factor(&self) -> f32
Returns vanilla
ItemBasedSteering.boostFactor.Source§impl LivingEntity for PigEntity
impl LivingEntity for PigEntity
Source§fn living_base(&self) -> &LivingEntityBase
fn living_base(&self) -> &LivingEntityBase
Returns a reference to the shared
LivingEntityBase that holds
living runtime state such as attributes, cached movement speed,
damage cooldown, and death animation counters.Source§fn get_health(&self) -> f32
fn get_health(&self) -> f32
Gets the current health of the entity.
Source§fn set_health(&self, health: f32)
fn set_health(&self, health: f32)
Sets the health of the entity, clamped between 0 and max health.
Source§fn hurt_sound(&self, _source: &DamageSource) -> Option<SoundEventRef>
fn hurt_sound(&self, _source: &DamageSource) -> Option<SoundEventRef>
Returns vanilla
LivingEntity.getHurtSound.Source§fn death_sound(&self) -> Option<SoundEventRef>
fn death_sound(&self) -> Option<SoundEventRef>
Returns vanilla
LivingEntity.getDeathSound.Source§fn can_use_slot(&self, slot: EquipmentSlot) -> bool
fn can_use_slot(&self, slot: EquipmentSlot) -> bool
Returns whether vanilla allows this entity to use
slot.Source§fn can_dispenser_equip_into_slot(&self, slot: EquipmentSlot) -> bool
fn can_dispenser_equip_into_slot(&self, slot: EquipmentSlot) -> bool
Returns the effective vanilla dispenser slot gate for living entities and mobs.
Source§fn equip_sound(
&self,
slot: EquipmentSlot,
_stack: &ItemStack,
) -> Option<SoundEventRef>
fn equip_sound( &self, slot: EquipmentSlot, _stack: &ItemStack, ) -> Option<SoundEventRef>
Returns the equip sound Steel can currently resolve for this entity.
Source§fn server_ai_step(&self)
fn server_ai_step(&self)
Server AI hook called from vanilla
LivingEntity.aiStep().Source§fn tick_ridden(&self, controller: &Player, _ridden_input: DVec3)
fn tick_ridden(&self, controller: &Player, _ridden_input: DVec3)
Mirrors vanilla
LivingEntity.tickRidden().Source§fn ridden_input(&self, _controller: &Player, _self_input: DVec3) -> DVec3
fn ridden_input(&self, _controller: &Player, _self_input: DVec3) -> DVec3
Mirrors vanilla
LivingEntity.getRiddenInput().Source§fn ridden_speed(&self, _controller: &Player) -> f32
fn ridden_speed(&self, _controller: &Player) -> f32
Mirrors vanilla
LivingEntity.getRiddenSpeed().Source§fn ai_step(&self) -> Option<MoveResult>
fn ai_step(&self) -> Option<MoveResult>
Mirrors vanilla
LivingEntity.aiStep().Source§fn living_rotation_state(&self) -> LivingRotationState
fn living_rotation_state(&self) -> LivingRotationState
Returns vanilla living body/head rotation state.
Source§fn y_body_rot(&self) -> f32
fn y_body_rot(&self) -> f32
Returns vanilla
LivingEntity.yBodyRot.Source§fn set_y_body_rot(&self, y_body_rot: f32)
fn set_y_body_rot(&self, y_body_rot: f32)
Sets vanilla
LivingEntity.yBodyRot.Source§fn y_head_rot(&self) -> f32
fn y_head_rot(&self) -> f32
Returns vanilla
LivingEntity.yHeadRot.Source§fn set_y_head_rot(&self, y_head_rot: f32)
fn set_y_head_rot(&self, y_head_rot: f32)
Sets vanilla
LivingEntity.yHeadRot.Source§fn advance_living_rotation_for_base_tick(&self)
fn advance_living_rotation_for_base_tick(&self)
Copies current living body/head rotations to vanilla old-rotation state.
Source§fn advance_attack_animation_for_base_tick(&self)
fn advance_attack_animation_for_base_tick(&self)
Copies current attack animation to vanilla old attack-animation state.
Source§fn base_tick_living_entity(&self)
fn base_tick_living_entity(&self)
Runs vanilla
LivingEntity.baseTick.Source§fn living_swing_state(&self) -> LivingSwingState
fn living_swing_state(&self) -> LivingSwingState
Returns vanilla arm-swing animation state.
Source§fn current_swing_duration(&self) -> i32
fn current_swing_duration(&self) -> i32
Returns vanilla
LivingEntity.getCurrentSwingDuration.Source§fn swing(&self, hand: InteractionHand, update_self: bool)
fn swing(&self, hand: InteractionHand, update_self: bool)
Runs vanilla
LivingEntity.swing.Source§fn update_swing_time(&self)
fn update_swing_time(&self)
Runs vanilla
LivingEntity.updateSwingTime.Source§fn attributes(&self) -> &SyncMutex<AttributeMap>
fn attributes(&self) -> &SyncMutex<AttributeMap>
Returns a reference to this entity’s attribute map.
Source§fn pack_syncable_attributes(&self) -> Vec<AttributeSnapshot>
fn pack_syncable_attributes(&self) -> Vec<AttributeSnapshot>
Packs syncable attributes for initial spawn pairing. Read more
Source§fn drain_dirty_syncable_attributes(&self) -> Vec<AttributeSnapshot>
fn drain_dirty_syncable_attributes(&self) -> Vec<AttributeSnapshot>
Drains syncable dirty attributes for per-tick tracking updates. Read more
Source§fn drain_dirty_mob_effects(&self) -> Vec<MobEffectSyncChange>
fn drain_dirty_mob_effects(&self) -> Vec<MobEffectSyncChange>
Drains dirty mob-effect packet changes for vanilla recipients.
Source§fn pack_all_equipment(&self) -> Vec<EquipmentSlotItem>
fn pack_all_equipment(&self) -> Vec<EquipmentSlotItem>
Packs non-empty equipment slots for initial spawn pairing.
Source§fn drain_dirty_equipment(&self) -> Vec<EquipmentSlotItem>
fn drain_dirty_equipment(&self) -> Vec<EquipmentSlotItem>
Drains equipment slots that changed since the last tracker sync.
Source§fn save_command_nbt(&self, nbt: &mut NbtCompound)
fn save_command_nbt(&self, nbt: &mut NbtCompound)
Appends vanilla-shaped living state used by command NBT predicates.
Source§fn get_max_health(&self) -> f32
fn get_max_health(&self) -> f32
Gets the maximum health from the attribute system.
Source§fn no_action_time(&self) -> i32
fn no_action_time(&self) -> i32
Returns vanilla
LivingEntity.noActionTime.Source§fn set_no_action_time(&self, no_action_time: i32)
fn set_no_action_time(&self, no_action_time: i32)
Sets vanilla
LivingEntity.noActionTime.Source§fn increment_no_action_time(&self)
fn increment_no_action_time(&self)
Increments vanilla
LivingEntity.noActionTime.Source§fn is_dead_or_dying(&self) -> bool
fn is_dead_or_dying(&self) -> bool
Returns true if the entity is dead or dying (health <= 0).
Source§fn sound_volume(&self) -> f32
fn sound_volume(&self) -> f32
Returns vanilla
LivingEntity.getSoundVolume.Source§fn voice_pitch(&self) -> f32
fn voice_pitch(&self) -> f32
Returns vanilla
LivingEntity.getVoicePitch.Source§fn make_sound(&self, sound: Option<SoundEventRef>)
fn make_sound(&self, sound: Option<SoundEventRef>)
Runs vanilla
LivingEntity.makeSound.Source§fn play_hurt_sound(&self, source: &DamageSource)
fn play_hurt_sound(&self, source: &DamageSource)
Runs vanilla
LivingEntity.playHurtSound.Source§fn play_death_sound(&self)
fn play_death_sound(&self)
Plays vanilla’s death sound for this living entity.
Source§fn get_age_scale(&self) -> f32
fn get_age_scale(&self) -> f32
Returns vanilla
LivingEntity.getAgeScale().Source§fn get_armor_cover_percentage(&self) -> f32
fn get_armor_cover_percentage(&self) -> f32
Returns vanilla
LivingEntity.getArmorCoverPercentage().Source§fn get_visibility_percent(&self, targeting_entity: Option<&dyn Entity>) -> f64
fn get_visibility_percent(&self, targeting_entity: Option<&dyn Entity>) -> f64
Returns vanilla
LivingEntity.getVisibilityPercent().Source§fn disguise_head_matches_targeting_entity(
&self,
targeting_entity: Option<&dyn Entity>,
) -> bool
fn disguise_head_matches_targeting_entity( &self, targeting_entity: Option<&dyn Entity>, ) -> bool
Returns whether the equipped head item reduces visibility to
targeting_entity.Source§fn can_be_seen_by_anyone(&self) -> bool
fn can_be_seen_by_anyone(&self) -> bool
Returns vanilla
LivingEntity.canBeSeenByAnyone().Source§fn can_be_seen_as_enemy(&self) -> bool
fn can_be_seen_as_enemy(&self) -> bool
Returns vanilla
LivingEntity.canBeSeenAsEnemy().Source§fn can_attack(&self, target: &dyn LivingEntity) -> bool
fn can_attack(&self, target: &dyn LivingEntity) -> bool
Returns vanilla
LivingEntity.canAttack().Source§fn last_damage_source(&self) -> Option<DamageSource>
fn last_damage_source(&self) -> Option<DamageSource>
Returns vanilla
LivingEntity.getLastDamageSource().Source§fn set_last_hurt_by_player(&self, player_uuid: Uuid, time_to_remember: i32)
fn set_last_hurt_by_player(&self, player_uuid: Uuid, time_to_remember: i32)
Sets vanilla
LivingEntity.lastHurtByPlayer.Source§fn last_hurt_by_player_memory_time(&self) -> i32
fn last_hurt_by_player_memory_time(&self) -> i32
Returns vanilla
LivingEntity.lastHurtByPlayerMemoryTime.Source§fn last_hurt_by_player_uuid(&self) -> Option<Uuid>
fn last_hurt_by_player_uuid(&self) -> Option<Uuid>
Returns vanilla
LivingEntity.lastHurtByPlayer, if still remembered.Source§fn last_hurt_by_mob(&self) -> Option<SharedEntity>
fn last_hurt_by_mob(&self) -> Option<SharedEntity>
Returns vanilla
LivingEntity.lastHurtByMob.Source§fn last_hurt_by_mob_timestamp(&self) -> i32
fn last_hurt_by_mob_timestamp(&self) -> i32
Returns vanilla
LivingEntity.lastHurtByMobTimestamp.Source§fn set_last_hurt_by_mob(&self, target: Option<&SharedEntity>)
fn set_last_hurt_by_mob(&self, target: Option<&SharedEntity>)
Sets vanilla
LivingEntity.lastHurtByMob.Source§fn last_hurt_mob(&self) -> Option<SharedEntity>
fn last_hurt_mob(&self) -> Option<SharedEntity>
Returns vanilla
LivingEntity.lastHurtMob.Source§fn last_hurt_mob_timestamp(&self) -> i32
fn last_hurt_mob_timestamp(&self) -> i32
Returns vanilla
LivingEntity.lastHurtMobTimestamp.Source§fn set_last_hurt_mob(&self, target: Option<&SharedEntity>)
fn set_last_hurt_mob(&self, target: Option<&SharedEntity>)
Sets vanilla
LivingEntity.lastHurtMob.Source§fn resolve_mob_responsible_for_damage(
&self,
world: &World,
source: &DamageSource,
)
fn resolve_mob_responsible_for_damage( &self, world: &World, source: &DamageSource, )
Resolves vanilla
LivingEntity.resolveMobResponsibleForDamage.Source§fn resolve_player_responsible_for_damage(
&self,
world: &World,
source: &DamageSource,
)
fn resolve_player_responsible_for_damage( &self, world: &World, source: &DamageSource, )
Resolves vanilla
LivingEntity.resolvePlayerResponsibleForDamage.Source§fn has_line_of_sight(&self, target: &dyn Entity) -> bool
fn has_line_of_sight(&self, target: &dyn Entity) -> bool
Returns vanilla
LivingEntity.hasLineOfSight().Source§fn has_line_of_sight_with(
&self,
target: &dyn Entity,
block_shape: ClipBlockShape,
fluid: ClipFluid,
target_eye_y: f64,
) -> bool
fn has_line_of_sight_with( &self, target: &dyn Entity, block_shape: ClipBlockShape, fluid: ClipFluid, target_eye_y: f64, ) -> bool
Returns vanilla line-of-sight with explicit clip options.
Source§fn default_is_invulnerable_to(&self, source: &DamageSource) -> bool
fn default_is_invulnerable_to(&self, source: &DamageSource) -> bool
Returns vanilla base living-entity invulnerability.
Source§fn is_invulnerable_to(&self, world: &World, source: &DamageSource) -> bool
fn is_invulnerable_to(&self, world: &World, source: &DamageSource) -> bool
Returns whether this living entity ignores a damage source.
Source§fn hurt_server(&self, world: &World, source: &DamageSource, amount: f32) -> bool
fn hurt_server(&self, world: &World, source: &DamageSource, amount: f32) -> bool
Main vanilla living-entity damage entry point. Read more
Source§fn before_actually_hurt(&self, _source: &DamageSource, _amount: f32)
fn before_actually_hurt(&self, _source: &DamageSource, _amount: f32)
Hook before applying damage after vanilla reductions.
Source§fn hurt_armor(&self, _source: &DamageSource, _damage: f32)
fn hurt_armor(&self, _source: &DamageSource, _damage: f32)
Damages equipment that participates in vanilla armor absorption.
Source§fn do_hurt_equipment(
&self,
source: &DamageSource,
damage: f32,
slots: &[EquipmentSlot],
)
fn do_hurt_equipment( &self, source: &DamageSource, damage: f32, slots: &[EquipmentSlot], )
Mirrors vanilla
LivingEntity.doHurtEquipment.Source§fn get_damage_after_armor_absorb(
&self,
source: &DamageSource,
damage: f32,
) -> f32
fn get_damage_after_armor_absorb( &self, source: &DamageSource, damage: f32, ) -> f32
Mirrors vanilla
LivingEntity.getDamageAfterArmorAbsorb.Source§fn get_damage_after_magic_absorb(
&self,
source: &DamageSource,
damage: f32,
) -> f32
fn get_damage_after_magic_absorb( &self, source: &DamageSource, damage: f32, ) -> f32
Mirrors vanilla
LivingEntity.getDamageAfterMagicAbsorb.Source§fn actually_hurt(&self, world: &World, source: &DamageSource, amount: f32)
fn actually_hurt(&self, world: &World, source: &DamageSource, amount: f32)
Applies damage after vanilla reductions.
Source§fn apply_damage_knockback(&self, source: &DamageSource)
fn apply_damage_knockback(&self, source: &DamageSource)
Applies vanilla hurt knockback for a damage source.
Source§fn damage_knockback_direction(&self, source: &DamageSource) -> (f64, f64)
fn damage_knockback_direction(&self, source: &DamageSource) -> (f64, f64)
Returns the horizontal direction used by vanilla damage knockback.
Source§fn knockback_resistance(&self) -> f64
fn knockback_resistance(&self) -> f64
Returns vanilla knockback resistance.
Source§fn indicate_damage(&self, _xd: f64, _zd: f64)
fn indicate_damage(&self, _xd: f64, _zd: f64)
Mirrors vanilla
LivingEntity.indicateDamage.Source§fn hurt_broadcast_chunk(&self) -> ChunkPos
fn hurt_broadcast_chunk(&self) -> ChunkPos
Returns the chunk used for vanilla nearby hurt broadcasts.
Source§fn broadcast_damage_event(&self, world: &World, source: &DamageSource)
fn broadcast_damage_event(&self, world: &World, source: &DamageSource)
Broadcasts vanilla damage-event metadata near this entity.
Source§fn broadcast_hurt_animation(&self, world: &World)
fn broadcast_hurt_animation(&self, world: &World)
Broadcasts vanilla hurt animation near this entity.
Source§fn die(&self, source: &DamageSource)
fn die(&self, source: &DamageSource)
Processes vanilla living death side effects.
Source§fn should_drop_loot(&self, world: &World) -> bool
fn should_drop_loot(&self, world: &World) -> bool
Returns vanilla
LivingEntity.shouldDropLoot.Source§fn should_drop_experience(&self) -> bool
fn should_drop_experience(&self) -> bool
Returns vanilla
LivingEntity.shouldDropExperience.Source§fn is_always_experience_dropper(&self) -> bool
fn is_always_experience_dropper(&self) -> bool
Returns vanilla
LivingEntity.isAlwaysExperienceDropper.Source§fn skip_drop_experience(&self)
fn skip_drop_experience(&self)
Runs vanilla
LivingEntity.skipDropExperience.Source§fn was_experience_consumed(&self) -> bool
fn was_experience_consumed(&self) -> bool
Returns vanilla
LivingEntity.wasExperienceConsumed.Source§fn base_experience_reward(&self) -> i32
fn base_experience_reward(&self) -> i32
Returns vanilla
LivingEntity.getBaseExperienceReward.Source§fn experience_reward(
&self,
_world: &World,
_killer_entity_id: Option<i32>,
) -> i32
fn experience_reward( &self, _world: &World, _killer_entity_id: Option<i32>, ) -> i32
Returns vanilla
LivingEntity.getExperienceReward.Source§fn drop_all_death_loot(&self, source: &DamageSource)
fn drop_all_death_loot(&self, source: &DamageSource)
Runs the currently implemented subset of vanilla
LivingEntity.dropAllDeathLoot.Source§fn drop_experience(&self, world: &Arc<World>, killer_entity_id: Option<i32>)
fn drop_experience(&self, world: &Arc<World>, killer_entity_id: Option<i32>)
Runs vanilla
LivingEntity.dropExperience.Source§fn death_loot_table(&self) -> Option<LootTableRef>
fn death_loot_table(&self) -> Option<LootTableRef>
Resolves the loot table used by vanilla
LivingEntity.dropFromLootTable.Source§fn death_loot_table_seed(&self) -> i64
fn death_loot_table_seed(&self) -> i64
Returns vanilla
Entity.getLootTableSeed for death loot.Source§fn drop_from_loot_table(&self, source: &DamageSource, killed_by_player: bool)
fn drop_from_loot_table(&self, source: &DamageSource, killed_by_player: bool)
Runs vanilla
LivingEntity.dropFromLootTable.Source§fn drop_custom_death_loot(
&self,
_source: &DamageSource,
_killed_by_player: bool,
)
fn drop_custom_death_loot( &self, _source: &DamageSource, _killed_by_player: bool, )
Hook for non-mob custom death loot.
Source§fn tick_death(&self)
fn tick_death(&self)
Ticks the vanilla living death animation and removes the entity at completion.
Source§fn get_absorption_amount(&self) -> f32
fn get_absorption_amount(&self) -> f32
Gets the absorption amount (extra health from effects like absorption).
Source§fn set_absorption_amount(&self, amount: f32)
fn set_absorption_amount(&self, amount: f32)
Sets the absorption amount.
Source§fn fall_damage_sound(&self, damage: i32) -> SoundEventRef
fn fall_damage_sound(&self, damage: i32) -> SoundEventRef
Returns vanilla
LivingEntity.getFallDamageSound().Source§fn play_block_fall_sound(&self)
fn play_block_fall_sound(&self)
Plays vanilla
LivingEntity.playBlockFallSound().Source§fn cause_living_fall_damage(
&self,
fall_distance: f64,
damage_modifier: f32,
source: &DamageSource,
) -> bool
fn cause_living_fall_damage( &self, fall_distance: f64, damage_modifier: f32, source: &DamageSource, ) -> bool
Mirrors vanilla
LivingEntity.causeFallDamage.Source§fn get_armor_value(&self) -> i32
fn get_armor_value(&self) -> i32
Gets the entity’s armor value from the attribute system.
Source§fn get_attribute_gravity(&self) -> f64
fn get_attribute_gravity(&self) -> f64
Gets the gravity value from the attribute system.
Source§fn get_effective_gravity(&self) -> f64
fn get_effective_gravity(&self) -> f64
Returns vanilla
LivingEntity.getEffectiveGravity().Source§fn is_affected_by_potions(&self) -> bool
fn is_affected_by_potions(&self) -> bool
Checks if the entity can be affected by potions.
Source§fn default_can_be_affected(&self, effect: &MobEffectInstance) -> bool
fn default_can_be_affected(&self, effect: &MobEffectInstance) -> bool
Returns vanilla base
LivingEntity.canBeAffected eligibility.Source§fn can_be_affected(&self, effect: &MobEffectInstance) -> bool
fn can_be_affected(&self, effect: &MobEffectInstance) -> bool
Returns whether this entity accepts a mob-effect instance. Read more
Source§fn has_mob_effect(&self, effect: MobEffectRef) -> bool
fn has_mob_effect(&self, effect: MobEffectRef) -> bool
Returns vanilla
LivingEntity.hasEffect().Source§fn mob_effect(&self, effect: MobEffectRef) -> Option<ActiveMobEffect>
fn mob_effect(&self, effect: MobEffectRef) -> Option<ActiveMobEffect>
Returns vanilla
LivingEntity.getEffect().Source§fn active_mob_effects(&self) -> Vec<ActiveMobEffect> ⓘ
fn active_mob_effects(&self) -> Vec<ActiveMobEffect> ⓘ
Returns all active vanilla mob effects.
Source§fn set_mob_effect(&self, effect: MobEffectRef, amplifier: i32)
fn set_mob_effect(&self, effect: MobEffectRef, amplifier: i32)
Sets active vanilla mob-effect state.
Source§fn add_mob_effect(&self, effect: MobEffectInstance) -> bool
fn add_mob_effect(&self, effect: MobEffectInstance) -> bool
Adds or updates active vanilla mob-effect state.
Source§fn set_mob_effect_active(&self, effect: MobEffectRef, active: bool)
fn set_mob_effect_active(&self, effect: MobEffectRef, active: bool)
Sets the presence of a vanilla mob effect.
Source§fn remove_mob_effect(&self, effect: MobEffectRef) -> bool
fn remove_mob_effect(&self, effect: MobEffectRef) -> bool
Removes active vanilla mob-effect state.
Source§fn tick_mob_effects(&self)
fn tick_mob_effects(&self)
Ticks vanilla server-side mob-effect behavior and durations.
Source§fn has_water_breathing(&self) -> bool
fn has_water_breathing(&self) -> bool
Returns whether vanilla effects keep this entity from drowning.
Source§fn should_effects_refill_air_supply(&self) -> bool
fn should_effects_refill_air_supply(&self) -> bool
Returns whether active vanilla effects refill this entity’s air supply.
Source§fn can_breathe_underwater(&self) -> bool
fn can_breathe_underwater(&self) -> bool
Returns vanilla
LivingEntity.canBreatheUnderwater.Source§fn can_drown_in_water(&self) -> bool
fn can_drown_in_water(&self) -> bool
Returns whether this entity can lose air and take drowning damage.
Source§fn is_eye_in_bubble_column(&self) -> bool
fn is_eye_in_bubble_column(&self) -> bool
Returns whether the entity’s eye block is a bubble column.
Source§fn decrease_air_supply(&self, current_supply: i32) -> i32
fn decrease_air_supply(&self, current_supply: i32) -> i32
Mirrors vanilla
LivingEntity.decreaseAirSupply.Source§fn increase_air_supply(&self, current_supply: i32) -> i32
fn increase_air_supply(&self, current_supply: i32) -> i32
Mirrors vanilla
LivingEntity.increaseAirSupply.Source§fn should_take_drowning_damage(&self) -> bool
fn should_take_drowning_damage(&self) -> bool
Mirrors vanilla
LivingEntity.shouldTakeDrowningDamage.Source§fn tick_living_air_supply(&self)
fn tick_living_air_supply(&self)
Ticks vanilla living air-supply and drowning behavior from
baseTick.Source§fn is_in_wall(&self) -> bool
fn is_in_wall(&self) -> bool
Mirrors vanilla
LivingEntity.isInWall.Source§fn tick_in_wall_damage(&self)
fn tick_in_wall_damage(&self)
Applies vanilla living in-wall damage from
baseTick.Source§fn tick_living_environmental_damage(&self)
fn tick_living_environmental_damage(&self)
Applies vanilla living environmental damage in
LivingEntity.baseTick order.Source§fn is_affected_by_fluids(&self) -> bool
fn is_affected_by_fluids(&self) -> bool
Returns vanilla
LivingEntity.isAffectedByFluids().Source§fn can_stand_on_fluid(&self, _fluid_state: FluidState) -> bool
fn can_stand_on_fluid(&self, _fluid_state: FluidState) -> bool
Returns vanilla
LivingEntity.canStandOnFluid().Source§fn is_using_item(&self) -> bool
fn is_using_item(&self) -> bool
Checks if the entity is currently using an item.
Source§fn is_blocking(&self) -> bool
fn is_blocking(&self) -> bool
Checks if the entity is blocking with a shield or similar item.
Source§fn is_fall_flying(&self) -> bool
fn is_fall_flying(&self) -> bool
Checks if the entity is fall flying (using elytra).
Source§fn set_fall_flying(&self, fall_flying: bool)
fn set_fall_flying(&self, fall_flying: bool)
Sets whether this entity is fall flying.
Source§fn fall_flying_ticks(&self) -> i32
fn fall_flying_ticks(&self) -> i32
Returns vanilla
LivingEntity.getFallFlyingTicks().Source§fn with_equipment_slot(
&self,
slot: EquipmentSlot,
visitor: &mut dyn FnMut(&ItemStack),
)
fn with_equipment_slot( &self, slot: EquipmentSlot, visitor: &mut dyn FnMut(&ItemStack), )
Visits the item in a vanilla living-entity equipment slot.
Source§fn is_holding(&self, predicate: &mut dyn FnMut(&ItemStack) -> bool) -> bool
fn is_holding(&self, predicate: &mut dyn FnMut(&ItemStack) -> bool) -> bool
Returns vanilla
LivingEntity.isHolding.Source§fn with_equipment_slot_mut(
&self,
slot: EquipmentSlot,
visitor: &mut dyn FnMut(&mut ItemStack),
)
fn with_equipment_slot_mut( &self, slot: EquipmentSlot, visitor: &mut dyn FnMut(&mut ItemStack), )
Mutates the item in a vanilla living-entity equipment slot.
Source§fn has_item_in_slot(&self, slot: EquipmentSlot) -> bool
fn has_item_in_slot(&self, slot: EquipmentSlot) -> bool
Returns whether this entity currently has an item in
slot.Source§fn can_equip_with_dispenser(&self, item_stack: &ItemStack) -> bool
fn can_equip_with_dispenser(&self, item_stack: &ItemStack) -> bool
Returns vanilla
LivingEntity.canEquipWithDispenser.Source§fn is_equippable_in_slot(
&self,
item_stack: &ItemStack,
slot: EquipmentSlot,
) -> bool
fn is_equippable_in_slot( &self, item_stack: &ItemStack, slot: EquipmentSlot, ) -> bool
Returns vanilla
LivingEntity.isEquippableInSlot.Source§fn interact_living_entity_with_equippable(
&self,
player: &Player,
hand: InteractionHand,
) -> InteractionResult
fn interact_living_entity_with_equippable( &self, player: &Player, hand: InteractionHand, ) -> InteractionResult
Runs vanilla’s equippable
ItemStack.interactLivingEntity branch.Source§fn refresh_equipment_attribute_modifiers(&self, slot: EquipmentSlot)
fn refresh_equipment_attribute_modifiers(&self, slot: EquipmentSlot)
Refreshes transient item attribute modifiers for one equipment slot.
Source§fn detect_equipment_updates(&self)
fn detect_equipment_updates(&self)
Detects and applies Vanilla living-equipment changes once per tick.
Source§fn pack_living_equipment(&self) -> Vec<EquipmentSlotItem>
fn pack_living_equipment(&self) -> Vec<EquipmentSlotItem>
Packs non-empty living equipment slots for initial spawn pairing.
Source§fn drain_dirty_living_equipment(&self) -> Vec<EquipmentSlotItem>
fn drain_dirty_living_equipment(&self) -> Vec<EquipmentSlotItem>
Drains dirty living equipment slots for tracker sync.
Source§fn has_infinite_materials(&self) -> bool
fn has_infinite_materials(&self) -> bool
Returns whether equipment durability should be skipped for this entity.
Source§fn on_equipped_item_broken(&self, slot: EquipmentSlot)
fn on_equipped_item_broken(&self, slot: EquipmentSlot)
Called after an equipped item breaks.
Source§fn default_living_can_freeze(&self) -> bool
fn default_living_can_freeze(&self) -> bool
Returns vanilla
LivingEntity.canFreeze() after concrete entity exemptions. Read moreSource§fn is_on_non_air_block_for_frost(&self) -> bool
fn is_on_non_air_block_for_frost(&self) -> bool
Returns whether vanilla
tryAddFrost sees a non-air block below.Source§fn remove_frost(&self)
fn remove_frost(&self)
Mirrors vanilla
LivingEntity.removeFrost.Source§fn try_add_frost(&self)
fn try_add_frost(&self)
Mirrors vanilla
LivingEntity.tryAddFrost.Source§fn tick_freezing(&self)
fn tick_freezing(&self)
Ticks vanilla
LivingEntity.aiStep freezing effects.Source§fn tick_living_entity(&self)
fn tick_living_entity(&self)
Runs vanilla
LivingEntity.tick. Read moreSource§fn tick_living_state(&self)
fn tick_living_state(&self)
Ticks living-entity counters after movement.
Source§fn can_glide_using(&self, item_stack: &ItemStack, slot: EquipmentSlot) -> bool
fn can_glide_using(&self, item_stack: &ItemStack, slot: EquipmentSlot) -> bool
Mirrors vanilla
LivingEntity.canGlideUsing().Source§fn can_glide_using_equipment_slot(&self, slot: EquipmentSlot) -> bool
fn can_glide_using_equipment_slot(&self, slot: EquipmentSlot) -> bool
Returns whether the item in
slot can be used for vanilla gliding.Source§fn damage_random_glider(&self)
fn damage_random_glider(&self)
Damages one random equipped glider like vanilla
LivingEntity.updateFallFlying().Source§fn default_can_glide(&self) -> bool
fn default_can_glide(&self) -> bool
Default vanilla
LivingEntity.canGlide() implementation for overrides.Source§fn start_fall_flying(&self)
fn start_fall_flying(&self)
Mirrors vanilla
Player.startFallFlying().Source§fn try_to_start_fall_flying(&self) -> bool
fn try_to_start_fall_flying(&self) -> bool
Mirrors vanilla
Player.tryToStartFallFlying().Source§fn last_climbable_pos(&self) -> Option<BlockPos>
fn last_climbable_pos(&self) -> Option<BlockPos>
Returns the last climbable block position this living entity touched.
Source§fn set_last_climbable_pos(&self, pos: BlockPos)
fn set_last_climbable_pos(&self, pos: BlockPos)
Records the last climbable block position this living entity touched.
Source§fn default_living_on_climbable(&self) -> bool
fn default_living_on_climbable(&self) -> bool
Returns vanilla
LivingEntity.onClimbable() behavior.Source§fn should_discard_friction(&self) -> bool
fn should_discard_friction(&self) -> bool
Returns whether vanilla living travel should skip friction damping.
Source§fn set_discard_friction(&self, discard_friction: bool)
fn set_discard_friction(&self, discard_friction: bool)
Sets whether vanilla living travel should skip friction damping.
Source§fn is_jumping(&self) -> bool
fn is_jumping(&self) -> bool
Returns whether this living entity is currently applying jump input.
Source§fn set_jumping(&self, jumping: bool)
fn set_jumping(&self, jumping: bool)
Sets whether this living entity is currently applying jump input.
Source§fn travel_input(&self) -> LivingTravelInput
fn travel_input(&self) -> LivingTravelInput
Returns vanilla living travel input.
Source§fn set_travel_input(&self, input: LivingTravelInput)
fn set_travel_input(&self, input: LivingTravelInput)
Sets vanilla living travel input.
Source§fn apply_input(&self)
fn apply_input(&self)
Applies vanilla
LivingEntity.applyInput() damping.Source§fn no_jump_delay(&self) -> i32
fn no_jump_delay(&self) -> i32
Returns vanilla jump cooldown ticks.
Source§fn set_no_jump_delay(&self, ticks: i32)
fn set_no_jump_delay(&self, ticks: i32)
Sets vanilla jump cooldown ticks.
Source§fn tick_no_jump_delay(&self)
fn tick_no_jump_delay(&self)
Decrements vanilla jump cooldown once per living AI step.
Source§fn default_is_immobile(&self) -> bool
fn default_is_immobile(&self) -> bool
Returns vanilla
LivingEntity.isImmobile().Source§fn is_immobile(&self) -> bool
fn is_immobile(&self) -> bool
Returns vanilla
LivingEntity.isImmobile().Source§fn apply_living_velocity_thresholds(&self)
fn apply_living_velocity_thresholds(&self)
Applies vanilla
LivingEntity.aiStep() velocity thresholds.Source§fn get_jump_boost_power(&self) -> f32
fn get_jump_boost_power(&self) -> f32
Returns vanilla
LivingEntity.getJumpBoostPower().Source§fn get_jump_power_with_multiplier(&self, multiplier: f32) -> f32
fn get_jump_power_with_multiplier(&self, multiplier: f32) -> f32
Returns vanilla
LivingEntity.getJumpPower(float).Source§fn get_jump_power(&self) -> f32
fn get_jump_power(&self) -> f32
Returns vanilla
LivingEntity.getJumpPower().Source§fn default_jump_from_ground(&self)
fn default_jump_from_ground(&self)
Default vanilla
LivingEntity.jumpFromGround() implementation for overrides.Source§fn jump_from_ground(&self)
fn jump_from_ground(&self)
Mirrors vanilla
LivingEntity.jumpFromGround().Source§fn go_down_in_water(&self)
fn go_down_in_water(&self)
Mirrors vanilla
LivingEntity.goDownInWater().Source§fn jump_in_liquid(&self, _fluid_tag: &Identifier)
fn jump_in_liquid(&self, _fluid_tag: &Identifier)
Mirrors vanilla
LivingEntity.jumpInLiquid().Source§fn handle_living_jump(&self)
fn handle_living_jump(&self)
Applies vanilla
LivingEntity.aiStep() jump handling.Source§fn travel_ridden(
&self,
controller: &Player,
self_input: DVec3,
) -> Option<MoveResult>
fn travel_ridden( &self, controller: &Player, self_input: DVec3, ) -> Option<MoveResult>
Mirrors vanilla
LivingEntity.travelRidden().Source§fn default_ai_step(&self) -> Option<MoveResult>
fn default_ai_step(&self) -> Option<MoveResult>
Default vanilla-shaped
LivingEntity.aiStep() movement foundation for overrides. Read moreSource§fn push_entities(&self)
fn push_entities(&self)
Mirrors vanilla
LivingEntity.pushEntities().Source§fn apply_entity_cramming_damage(
&self,
world: &World,
pushable_entities: &[SharedEntity],
)
fn apply_entity_cramming_damage( &self, world: &World, pushable_entities: &[SharedEntity], )
Applies vanilla max entity cramming damage from
LivingEntity.pushEntities().Source§fn is_suppressing_sliding_down_ladder(&self) -> bool
fn is_suppressing_sliding_down_ladder(&self) -> bool
Returns vanilla
LivingEntity.isSuppressingSlidingDownLadder().Source§fn levitation_travel_y_delta(&self, movement_y: f64) -> Option<f64>
fn levitation_travel_y_delta(&self, movement_y: f64) -> Option<f64>
Returns a levitation velocity adjustment for
travelInAir.Source§fn should_travel_in_fluid(&self, fluid_state: FluidState) -> bool
fn should_travel_in_fluid(&self, fluid_state: FluidState) -> bool
Returns whether vanilla
LivingEntity.travel() should use fluid movement.Source§fn get_water_slow_down(&self) -> f32
fn get_water_slow_down(&self) -> f32
Returns vanilla
LivingEntity.getWaterSlowDown().Source§fn water_movement_efficiency(&self) -> f32
fn water_movement_efficiency(&self) -> f32
Returns the water movement efficiency attribute used by fluid travel.
Source§fn has_dolphins_grace(&self) -> bool
fn has_dolphins_grace(&self) -> bool
Returns whether dolphin’s grace should apply to water travel.
Source§fn get_flying_speed(&self) -> f32
fn get_flying_speed(&self) -> f32
Returns vanilla
LivingEntity.getFlyingSpeed().Source§fn get_friction_influenced_speed(&self, block_friction: f32) -> f32
fn get_friction_influenced_speed(&self, block_friction: f32) -> f32
Returns vanilla
LivingEntity.getFrictionInfluencedSpeed().Source§fn air_travel_vertical_friction(&self, _horizontal_friction: f32) -> f32
fn air_travel_vertical_friction(&self, _horizontal_friction: f32) -> f32
Returns the vertical friction used by
travelInAir.Source§fn handle_on_climbable(&self, movement: DVec3) -> DVec3
fn handle_on_climbable(&self, movement: DVec3) -> DVec3
Applies vanilla
LivingEntity.handleOnClimbable().Source§fn apply_living_travel_gravity(&self)
fn apply_living_travel_gravity(&self)
Applies gravity using vanilla living-entity effective gravity.
Source§fn handle_relative_friction_and_calculate_movement(
&self,
input: DVec3,
block_friction: f32,
) -> Option<(DVec3, MoveResult)>
fn handle_relative_friction_and_calculate_movement( &self, input: DVec3, block_friction: f32, ) -> Option<(DVec3, MoveResult)>
Mirrors vanilla
LivingEntity.handleRelativeFrictionAndCalculateMovement().Source§fn travel_in_air(&self, input: DVec3) -> Option<MoveResult>
fn travel_in_air(&self, input: DVec3) -> Option<MoveResult>
Mirrors vanilla
LivingEntity.travelInAir().Source§fn get_fluid_falling_adjusted_movement(
&self,
base_gravity: f64,
is_falling: bool,
movement: DVec3,
) -> DVec3
fn get_fluid_falling_adjusted_movement( &self, base_gravity: f64, is_falling: bool, movement: DVec3, ) -> DVec3
Mirrors vanilla
LivingEntity.getFluidFallingAdjustedMovement().Source§fn jump_out_of_fluid(&self, old_y: f64)
fn jump_out_of_fluid(&self, old_y: f64)
Mirrors vanilla
LivingEntity.jumpOutOfFluid().Source§fn float_in_water_while_ridden(&self)
fn float_in_water_while_ridden(&self)
Mirrors vanilla
LivingEntity.floatInWaterWhileRidden().Source§fn travel_in_water(
&self,
input: DVec3,
base_gravity: f64,
is_falling: bool,
old_y: f64,
) -> Option<MoveResult>
fn travel_in_water( &self, input: DVec3, base_gravity: f64, is_falling: bool, old_y: f64, ) -> Option<MoveResult>
Mirrors vanilla
LivingEntity.travelInWater().Source§fn travel_in_lava(
&self,
input: DVec3,
base_gravity: f64,
is_falling: bool,
old_y: f64,
) -> Option<MoveResult>
fn travel_in_lava( &self, input: DVec3, base_gravity: f64, is_falling: bool, old_y: f64, ) -> Option<MoveResult>
Mirrors vanilla
LivingEntity.travelInLava().Source§fn travel_in_fluid(&self, input: DVec3) -> Option<MoveResult>
fn travel_in_fluid(&self, input: DVec3) -> Option<MoveResult>
Mirrors vanilla
LivingEntity.travelInFluid().Source§fn update_fall_flying(&self)
fn update_fall_flying(&self)
Mirrors the validation part of vanilla
LivingEntity.updateFallFlying().Source§fn update_fall_flying_movement(&self, movement: DVec3) -> DVec3
fn update_fall_flying_movement(&self, movement: DVec3) -> DVec3
Mirrors vanilla
LivingEntity.updateFallFlyingMovement().Source§fn stop_fall_flying(&self)
fn stop_fall_flying(&self)
Mirrors vanilla
LivingEntity.stopFallFlying().Source§fn handle_fall_flying_collisions(
&self,
previous_horizontal_speed: f64,
new_horizontal_speed: f64,
)
fn handle_fall_flying_collisions( &self, previous_horizontal_speed: f64, new_horizontal_speed: f64, )
Mirrors vanilla
LivingEntity.handleFallFlyingCollisions().Source§fn travel_fall_flying(&self, input: DVec3) -> Option<MoveResult>
fn travel_fall_flying(&self, input: DVec3) -> Option<MoveResult>
Mirrors vanilla
LivingEntity.travelFallFlying().Source§fn default_travel(&self, input: DVec3) -> Option<MoveResult>
fn default_travel(&self, input: DVec3) -> Option<MoveResult>
Default vanilla
LivingEntity.travel() implementation for overrides.Source§fn sleeping_pos(&self) -> Option<BlockPos>
fn sleeping_pos(&self) -> Option<BlockPos>
Returns the bed position that makes this living entity sleeping.
Source§fn set_sleeping_pos(&self, bed_position: BlockPos)
fn set_sleeping_pos(&self, bed_position: BlockPos)
Sets the vanilla living-entity sleeping position.
Source§fn clear_sleeping_pos(&self)
fn clear_sleeping_pos(&self)
Clears the vanilla living-entity sleeping position.
Source§fn is_sleeping(&self) -> bool
fn is_sleeping(&self) -> bool
Checks if the entity is sleeping.
Source§fn stop_sleeping(&self)
fn stop_sleeping(&self)
Stops the entity from sleeping.
Source§fn is_sprinting(&self) -> bool
fn is_sprinting(&self) -> bool
Checks if the entity is sprinting.
Source§fn set_sprinting(&self, sprinting: bool)
fn set_sprinting(&self, sprinting: bool)
Sets whether the entity is sprinting.
Source§fn apply_post_impulse_grace_time(&self, ticks: i32)
fn apply_post_impulse_grace_time(&self, ticks: i32)
Applies vanilla post-impulse movement validation grace.
Source§fn set_ignore_fall_damage_from_current_impulse(
&self,
ignore_fall_damage: bool,
new_impulse_impact_pos: DVec3,
)
fn set_ignore_fall_damage_from_current_impulse( &self, ignore_fall_damage: bool, new_impulse_impact_pos: DVec3, )
Mirrors vanilla
LivingEntity.setIgnoreFallDamageFromCurrentImpulse.Source§fn is_ignoring_fall_damage_from_current_impulse(&self) -> bool
fn is_ignoring_fall_damage_from_current_impulse(&self) -> bool
Returns vanilla
LivingEntity.isIgnoringFallDamageFromCurrentImpulse.Source§fn current_impulse_impact_pos(&self) -> Option<DVec3>
fn current_impulse_impact_pos(&self) -> Option<DVec3>
Returns vanilla
LivingEntity.currentImpulseImpactPos.Source§fn try_reset_current_impulse_context(&self)
fn try_reset_current_impulse_context(&self)
Mirrors vanilla
LivingEntity.tryResetCurrentImpulseContext.Source§fn reset_current_impulse_context(&self)
fn reset_current_impulse_context(&self)
Mirrors vanilla
LivingEntity.resetCurrentImpulseContext.Source§fn is_in_post_impulse_grace_time(&self) -> bool
fn is_in_post_impulse_grace_time(&self) -> bool
Returns whether movement validation is inside post-impulse grace.
Source§fn tick_post_impulse_grace_time(&self)
fn tick_post_impulse_grace_time(&self)
Decrements post-impulse grace once per living-entity tick.
Source§fn refresh_dirty_attributes(&self)
fn refresh_dirty_attributes(&self)
Drains dirty attributes and applies server-side effects.
Source§impl Mob for PigEntity
impl Mob for PigEntity
fn mob_base(&self) -> &MobBase
fn tick_goal_selectors(&self)
fn custom_server_ai_step(&self)
fn ambient_sound(&self) -> Option<SoundEventRef>
fn finalize_spawn( &self, world: &Arc<World>, spawn_reason: EntitySpawnReason, group_data: Option<SpawnGroupData>, ) -> Option<SpawnGroupData>
Source§fn mob_interact(
&self,
player: &Player,
hand: InteractionHand,
) -> InteractionResult
fn mob_interact( &self, player: &Player, hand: InteractionHand, ) -> InteractionResult
Handles vanilla
Mob.mobInteract.fn mob_flags(&self) -> i8
fn set_mob_flags(&self, flags: i8)
Source§fn is_saddled(&self) -> bool
fn is_saddled(&self) -> bool
Returns vanilla
Mob.isSaddled.fn xp_reward(&self) -> i32
fn set_xp_reward(&self, xp_reward: i32)
Source§fn target(&self) -> Option<SharedEntity>
fn target(&self) -> Option<SharedEntity>
Returns vanilla
Mob.getTarget.Source§fn set_target(&self, target: Option<&SharedEntity>) -> bool
fn set_target(&self, target: Option<&SharedEntity>) -> bool
Sets vanilla
Mob.target. Read morefn is_valid_target(&self, target: &dyn LivingEntity) -> bool
Source§fn can_attack(&self, target: &dyn LivingEntity) -> bool
fn can_attack(&self, target: &dyn LivingEntity) -> bool
Returns vanilla
Mob.canAttack.fn base_experience_reward_mob(&self) -> i32
fn ambient_sound_interval(&self) -> i32
fn play_ambient_sound(&self)
fn reset_ambient_sound_time(&self)
Source§fn base_tick_mob(&self)
fn base_tick_mob(&self)
Runs vanilla
Mob.baseTick.Source§fn mob_base_tick(&self)
fn mob_base_tick(&self)
Runs the mob-owned portion of vanilla
Mob.baseTick.fn finalize_spawn_mob_base( &self, _world: &Arc<World>, _spawn_reason: EntitySpawnReason, group_data: Option<SpawnGroupData>, ) -> Option<SpawnGroupData>
Source§fn interact_mob(
&self,
player: &Player,
hand: InteractionHand,
location: DVec3,
) -> InteractionResult
fn interact_mob( &self, player: &Player, hand: InteractionHand, location: DVec3, ) -> InteractionResult
Handles vanilla
Mob.interact.Source§fn can_shear_equipment(&self, _player: &Player) -> bool
fn can_shear_equipment(&self, _player: &Player) -> bool
Returns vanilla
Mob.canShearEquipment.Source§fn use_player_item(&self, player: &Player, hand: InteractionHand)
fn use_player_item(&self, player: &Player, hand: InteractionHand)
Applies vanilla
Mob.usePlayerItem.fn remove_when_far_away(&self, dist_sqr: f64) -> bool
fn requires_custom_persistence(&self) -> bool
fn is_persistence_required(&self) -> bool
fn set_persistence_required(&self)
Source§fn can_pick_up_loot(&self) -> bool
fn can_pick_up_loot(&self) -> bool
Returns vanilla
Mob.canPickUpLoot.fn set_can_pick_up_loot(&self, can_pick_up_loot: bool)
fn equipment_drop_chance(&self, slot: EquipmentSlot) -> f32
fn is_equipment_drop_preserved(&self, slot: EquipmentSlot) -> bool
fn set_guaranteed_drop(&self, slot: EquipmentSlot)
fn drop_custom_death_loot_mob( &self, _source: &DamageSource, killed_by_player: bool, )
fn save_mob(&self, nbt: &mut NbtCompound)
fn load_mob(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn set_death_loot_table(&self, loot_table: Option<Identifier>)
fn set_death_loot_table_seed(&self, seed: i64)
fn custom_death_loot_table(&self) -> Option<LootTableRef>
fn has_custom_death_loot_table(&self) -> bool
fn death_loot_table_seed(&self) -> i64
fn clear_custom_death_loot_table(&self)
fn is_leashed(&self) -> bool
fn may_be_leashed(&self) -> bool
fn leash_holder(&self) -> Option<SharedEntity>
fn leash_attachment(&self) -> Option<LeashAttachment>
fn set_delayed_leash_attachment(&self, attachment: LeashAttachment)
fn can_be_leashed(&self) -> bool
fn leash_distance_to(&self, holder: &dyn Entity) -> f64
fn leash_snap_distance(&self) -> f64
fn leash_elastic_distance(&self) -> f64
fn when_leashed_to(&self, holder: &dyn Entity)
fn leash_too_far_behaviour(&self)
fn on_elastic_leash_pull(&self)
fn close_range_leash_behaviour(&self, _holder: &dyn Entity)
fn check_elastic_interactions(&self, holder: &dyn Entity) -> bool
fn apply_leash_angular_momentum(&self) -> bool
fn rotate_by_leash_angular_momentum(&self, angular_momentum: f64)
fn leash_angular_momentum(&self) -> Option<f64>
fn leash_angular_friction(&self) -> f64
fn can_have_a_leash_attached_to(&self, holder: &dyn Entity) -> bool
fn set_leashed_to(&self, holder: &SharedEntity) -> bool
fn tick_leash(&self)
fn drop_leash(&self)
fn remove_leash(&self)
fn remove_leash_state(&self) -> Option<SharedEntity>
fn is_within_home(&self) -> bool
fn is_within_home_pos(&self, pos: BlockPos) -> bool
fn is_within_home_vec(&self, pos: DVec3) -> bool
fn set_home_to(&self, position: BlockPos, radius: i32)
fn home_position(&self) -> BlockPos
fn home_radius(&self) -> i32
fn clear_home(&self)
fn has_home(&self) -> bool
fn check_mob_despawn(&self)
fn nearest_player_distance_sqr(&self) -> Option<f64>
fn controlling_passenger_mob(&self) -> Option<SharedEntity>
fn get_pathfinding_malus(&self, path_type: PathType) -> f32
Source§fn max_fall_distance(&self) -> i32
fn max_fall_distance(&self) -> i32
Vanilla
Entity.getMaxFallDistance baseline.fn set_pathfinding_malus(&self, path_type: PathType, malus: f32)
fn is_no_ai(&self) -> bool
fn set_no_ai(&self, no_ai: bool)
fn is_left_handed(&self) -> bool
fn set_left_handed(&self, left_handed: bool)
fn is_aggressive(&self) -> bool
Source§fn max_head_x_rot(&self) -> f32
fn max_head_x_rot(&self) -> f32
Returns vanilla
Mob.getMaxHeadXRot.Source§fn max_head_y_rot(&self) -> f32
fn max_head_y_rot(&self) -> f32
Returns vanilla
Mob.getMaxHeadYRot.Source§fn do_hurt_target(&self, world: &World, target: &SharedEntity) -> bool
fn do_hurt_target(&self, world: &World, target: &SharedEntity) -> bool
Handles vanilla
Mob.doHurtTarget.Source§fn mob_attack_damage_source(
&self,
weapon_item: &ItemStack,
attacker: &dyn LivingEntity,
) -> DamageSource
fn mob_attack_damage_source( &self, weapon_item: &ItemStack, attacker: &dyn LivingEntity, ) -> DamageSource
Returns the damage source used by vanilla
ItemStack.getDamageSource.Source§fn get_attack_knockback(
&self,
target: &dyn Entity,
weapon_item: &ItemStack,
damage_source: &DamageSource,
) -> f64
fn get_attack_knockback( &self, target: &dyn Entity, weapon_item: &ItemStack, damage_source: &DamageSource, ) -> f64
Returns vanilla
LivingEntity.getKnockback for mob attacks.Source§fn cause_extra_knockback(
&self,
target: &dyn Entity,
knockback_amount: f64,
_old_movement: DVec3,
)
fn cause_extra_knockback( &self, target: &dyn Entity, knockback_amount: f64, _old_movement: DVec3, )
Applies vanilla
LivingEntity.causeExtraKnockback.Source§fn play_attack_sound(&self)
fn play_attack_sound(&self)
Plays vanilla
LivingEntity.playAttackSound.Source§fn is_within_melee_attack_range(&self, target: &dyn LivingEntity) -> bool
fn is_within_melee_attack_range(&self, target: &dyn LivingEntity) -> bool
Returns vanilla
Mob.isWithinMeleeAttackRange.Source§fn attack_bounding_box(&self, horizontal_expansion: f64) -> WorldAabb
fn attack_bounding_box(&self, horizontal_expansion: f64) -> WorldAabb
Returns vanilla
Mob.getAttackBoundingBox.fn set_aggressive(&self, aggressive: bool)
fn set_mob_flag(&self, flag: i8, enabled: bool)
fn controlled_mob_vehicle(&self) -> Option<SharedEntity>
fn set_wanted_position(&self, position: DVec3, speed_modifier: f64)
fn jump_control_jump(&self)
Source§fn set_mob_speed(&self, speed: f32)
fn set_mob_speed(&self, speed: f32)
Mirrors vanilla
Mob.setSpeed: update cached speed and forward AI input.fn mob_server_ai_step(&self)
fn tick_move_control(&self)
fn tick_move_to_control(&self, wanted_position: DVec3, speed_modifier: f64)
fn tick_strafe_control(&self, forward: f32, right: f32)
fn is_strafe_walkable(&self, dx: f32, dz: f32) -> bool
fn tick_jumping_control(&self, speed_modifier: f64)
fn tick_look_control(&self)
fn clamp_head_rotation_to_body_when_pathing(&self)
fn tick_jump_control(&self)
fn update_control_flags(&self)
fn tick_body_rotation_control(&self)
Source§impl PathfinderMob for PigEntity
impl PathfinderMob for PigEntity
fn controlled_pathfinder_vehicle(&self) -> Option<SharedEntity>
fn get_walk_target_value(&self, pos: BlockPos) -> f32
fn has_line_of_sight_cached(&self, target: &dyn Entity) -> bool
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)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 create_path_to_targets( &self, world: &Arc<World>, targets: &[BlockPos], reach_range: i32, ) -> Option<Path>
Auto Trait Implementations§
impl !Freeze for PigEntity
impl !RefUnwindSafe for PigEntity
impl !UnwindSafe for PigEntity
impl Send for PigEntity
impl Sync for PigEntity
impl Unpin for PigEntity
impl UnsafeUnpin for PigEntity
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> Downcast for Twhere
T: ErasedType + ?Sized,
impl<T> Downcast for Twhere
T: ErasedType + ?Sized,
Source§fn is<T>(&self) -> boolwhere
T: DowncastType,
fn is<T>(&self) -> boolwhere
T: DowncastType,
Returns whether the erased value has concrete type
T.Source§fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastType,
fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastType,
Returns the erased value as
T when its key matches.Source§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: DowncastType,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: DowncastType,
Returns the erased value as mutable
T when its key matches.Source§impl<T> EntityEventSource for Twhere
T: Entity,
impl<T> EntityEventSource for Twhere
T: Entity,
Source§fn as_entity_event_source(&self) -> &(dyn Entity + 'static)
fn as_entity_event_source(&self) -> &(dyn Entity + 'static)
Returns this entity as a game-event source.
Source§impl<T> ErasedType for Twhere
T: DowncastType,
impl<T> ErasedType for Twhere
T: DowncastType,
fn downcast_type_key(&self) -> DowncastTypeKey
fn downcast_data(&self) -> *const ()
fn downcast_data_mut(&mut self) -> *mut ()
§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<>>