pub struct ChickenEntity {
base: EntityBase,
entity_type: EntityTypeRef,
living_base: LivingEntityBase,
mob_base: MobBase,
ageable_base: AgeableMobBase,
animal_base: AnimalBase,
chicken_state: SyncMutex<ChickenState>,
entity_data: SyncMutex<ChickenEntityData>,
}Expand description
Vanilla chicken entity.
Fields§
§base: EntityBase§entity_type: EntityTypeRef§living_base: LivingEntityBase§mob_base: MobBase§ageable_base: AgeableMobBase§animal_base: AnimalBase§chicken_state: SyncMutex<ChickenState>§entity_data: SyncMutex<ChickenEntityData>Implementations§
Source§impl ChickenEntity
impl ChickenEntity
Sourcepub(crate) const SPAWN_RULE: fn(EntityTypeRef, &dyn LevelReader, EntitySpawnReason, BlockPos, &mut dyn Rng) -> bool
pub(crate) const SPAWN_RULE: fn(EntityTypeRef, &dyn LevelReader, EntitySpawnReason, BlockPos, &mut dyn Rng) -> bool
Vanilla SpawnPlacements predicate: Animal.checkAnimalSpawnRules.
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 chicken at runtime.
Sourcepub fn from_saved(entity_type: EntityTypeRef, load: EntityBaseLoad) -> Self
pub fn from_saved(entity_type: EntityTypeRef, load: EntityBaseLoad) -> Self
Reconstructs a chicken from persisted base entity state.
fn new_with_base(base: EntityBase, entity_type: EntityTypeRef) -> Self
Sourcepub fn set_variant(&self, variant: ChickenVariantRef)
pub fn set_variant(&self, variant: ChickenVariantRef)
Sets the active chicken variant by registry entry.
Sourcepub fn variant(&self) -> ChickenVariantRef
pub fn variant(&self) -> ChickenVariantRef
Returns the active chicken variant, falling back to temperate when invalid.
Sourcepub fn set_sound_variant(&self, sound_variant: ChickenSoundVariantRef)
pub fn set_sound_variant(&self, sound_variant: ChickenSoundVariantRef)
Sets the active chicken sound variant by registry entry.
Sourcepub fn sound_variant(&self) -> ChickenSoundVariantRef
pub fn sound_variant(&self) -> ChickenSoundVariantRef
Returns the active chicken sound variant, falling back to classic when invalid.
fn set_variant_by_key(&self, key: &Identifier) -> bool
fn set_sound_variant_by_key(&self, key: &Identifier)
Sourcefn current_sound_set(&self) -> &'static ChickenAge
fn current_sound_set(&self) -> &'static ChickenAge
Returns the sound set for this chicken’s current age (vanilla Chicken.getSoundSet).
fn update_dirty_mob_effect_entity_data(&self)
Sourcepub fn is_food(item_stack: &ItemStack) -> bool
pub fn is_food(item_stack: &ItemStack) -> bool
Returns whether an item stack matches the vanilla chicken food tag.
Sourcepub fn is_chicken_jockey(&self) -> bool
pub fn is_chicken_jockey(&self) -> bool
Returns whether this chicken is currently ridden by a chicken jockey mob.
Sourcepub fn set_chicken_jockey(&self, is_chicken_jockey: bool)
pub fn set_chicken_jockey(&self, is_chicken_jockey: bool)
Sets whether this chicken is a chicken jockey mount.
Sourcefn set_egg_time(&self, egg_time: i32)
fn set_egg_time(&self, egg_time: i32)
Sets the remaining ticks before the next egg is laid.
Sourcefn roll_egg_lay_time() -> i32
fn roll_egg_lay_time() -> i32
Rolls the vanilla randomized delay before the next egg lay.
Sourcefn tick_flapping(&self)
fn tick_flapping(&self)
Runs vanilla Chicken.aiStep wing-flap and slow-fall side effects.
Sourcefn tick_egg_laying(&self)
fn tick_egg_laying(&self)
Runs vanilla Chicken.aiStep egg-laying side effects.
Sourcefn drop_gift_loot_table(&self, loot_table: LootTableRef) -> bool
fn drop_gift_loot_table(&self, loot_table: LootTableRef) -> bool
Rolls a gift loot table at this entity’s position and drops each result.
Mirrors vanilla LivingEntity.dropFromGiftLootTable for the
gameplay/chicken_lay table, returning whether any item was dropped.
Trait Implementations§
Source§impl AgeableMob for ChickenEntity
impl AgeableMob for ChickenEntity
Source§fn ageable_base(&self) -> &AgeableMobBase
fn ageable_base(&self) -> &AgeableMobBase
Source§fn is_age_locked(&self) -> bool
fn is_age_locked(&self) -> bool
Source§fn set_age_locked(&self, age_locked: bool)
fn set_age_locked(&self, age_locked: bool)
Source§fn set_synced_baby(&self, baby: bool)
fn set_synced_baby(&self, baby: bool)
Source§fn age_boundary_changed(&self, _baby: bool)
fn age_boundary_changed(&self, _baby: bool)
Source§fn breed_variant_key(&self) -> Option<&Identifier>
fn breed_variant_key(&self) -> Option<&Identifier>
Source§fn set_breed_variant_key(&self, key: &Identifier) -> bool
fn set_breed_variant_key(&self, key: &Identifier) -> bool
Source§fn initialize_breed_offspring(
&self,
partner: &dyn AgeableMob,
offspring: &dyn AgeableMob,
)
fn initialize_breed_offspring( &self, partner: &dyn AgeableMob, offspring: &dyn AgeableMob, )
Source§fn get_baby_start_age(&self) -> i32
fn get_baby_start_age(&self) -> i32
Source§fn forced_age(&self) -> i32
fn forced_age(&self) -> i32
Source§fn set_forced_age(&self, forced_age: i32)
fn set_forced_age(&self, forced_age: i32)
Source§fn forced_age_timer(&self) -> i32
fn forced_age_timer(&self) -> i32
Source§fn set_forced_age_timer(&self, forced_age_timer: i32)
fn set_forced_age_timer(&self, forced_age_timer: i32)
Source§fn age_lock_particle_timer(&self) -> i32
fn age_lock_particle_timer(&self) -> i32
Source§fn set_age_lock_particle_timer(&self, timer: i32)
fn set_age_lock_particle_timer(&self, timer: i32)
Source§fn can_age_up(&self) -> bool
fn can_age_up(&self) -> bool
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,
Source§fn age_up(&self, seconds: i32, forced: bool)
fn age_up(&self, seconds: i32, forced: bool)
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>
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
Source§fn create_breed_offspring(&self, world: &Arc<World>) -> Option<SharedEntity>
fn create_breed_offspring(&self, world: &Arc<World>) -> Option<SharedEntity>
Source§fn get_breed_offspring(
&self,
world: &Arc<World>,
partner: &dyn AgeableMob,
) -> Option<SharedEntity>
fn get_breed_offspring( &self, world: &Arc<World>, partner: &dyn AgeableMob, ) -> Option<SharedEntity>
Source§fn tick_ageable_mob(&self)
fn tick_ageable_mob(&self)
Source§fn save_ageable_mob(&self, nbt: &mut NbtCompound)
fn save_ageable_mob(&self, nbt: &mut NbtCompound)
Source§fn load_ageable_mob(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn load_ageable_mob(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
Source§impl Animal for ChickenEntity
impl Animal for ChickenEntity
Source§fn animal_base(&self) -> &AnimalBase
fn animal_base(&self) -> &AnimalBase
Source§fn is_food(&self, item_stack: &ItemStack) -> bool
fn is_food(&self, item_stack: &ItemStack) -> bool
Source§fn in_love_time(&self) -> i32
fn in_love_time(&self) -> i32
Source§fn set_in_love_time(&self, in_love: i32)
fn set_in_love_time(&self, in_love: i32)
Source§fn love_cause_uuid(&self) -> Option<Uuid>
fn love_cause_uuid(&self) -> Option<Uuid>
Source§fn set_love_cause_uuid(&self, love_cause: Option<Uuid>)
fn set_love_cause_uuid(&self, love_cause: Option<Uuid>)
Source§fn is_in_love(&self) -> bool
fn is_in_love(&self) -> bool
Source§fn can_fall_in_love(&self) -> bool
fn can_fall_in_love(&self) -> bool
Source§fn set_in_love(&self, player: Option<&Player>)
fn set_in_love(&self, player: Option<&Player>)
Source§fn reset_love(&self)
fn reset_love(&self)
Source§fn can_mate(&self, partner: &dyn Animal) -> bool
fn can_mate(&self, partner: &dyn Animal) -> bool
partner are eligible to breed:
distinct entities of the same type, both currently in love.Source§fn base_experience_reward_animal(&self) -> i32
fn base_experience_reward_animal(&self) -> i32
Source§fn ambient_sound_interval_animal(&self) -> i32
fn ambient_sound_interval_animal(&self) -> i32
Source§fn animal_walk_target_value(&self, pos: BlockPos) -> f32
fn animal_walk_target_value(&self, pos: BlockPos) -> f32
pos is as an AI walk target: favors grass
blocks, otherwise falls back to light-level pathfinding cost.Source§fn is_bright_enough_to_spawn(
level: &(impl LevelReader + ?Sized),
pos: BlockPos,
) -> boolwhere
Self: Sized,
fn is_bright_enough_to_spawn(
level: &(impl LevelReader + ?Sized),
pos: BlockPos,
) -> boolwhere
Self: Sized,
pos is bright enough for an animal to naturally spawn.Source§fn check_animal_spawn_rules(
_entity_type: EntityTypeRef,
level: &(impl LevelReader + ?Sized),
spawn_reason: EntitySpawnReason,
pos: BlockPos,
_random: &mut dyn Rng,
) -> boolwhere
Self: Sized,
fn check_animal_spawn_rules(
_entity_type: EntityTypeRef,
level: &(impl LevelReader + ?Sized),
spawn_reason: EntitySpawnReason,
pos: BlockPos,
_random: &mut dyn Rng,
) -> boolwhere
Self: Sized,
pos: the block
below must allow animal spawning, and light must be sufficient unless
the spawn reason ignores light requirements.Source§fn play_eating_sound(&self)
fn play_eating_sound(&self)
Source§fn mob_interact_animal(
&self,
player: &Player,
hand: InteractionHand,
) -> InteractionResult
fn mob_interact_animal( &self, player: &Player, hand: InteractionHand, ) -> InteractionResult
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)
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>, )
Source§fn tick_animal_love(&self)
fn tick_animal_love(&self)
Source§fn custom_server_ai_step_animal(&self)
fn custom_server_ai_step_animal(&self)
Source§fn remove_when_far_away_animal(&self, _dist_sqr: f64) -> bool
fn remove_when_far_away_animal(&self, _dist_sqr: f64) -> bool
Source§fn save_animal(&self, nbt: &mut NbtCompound)
fn save_animal(&self, nbt: &mut NbtCompound)
Source§fn load_animal(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn load_animal(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
Source§impl DefaultEntityPush for ChickenEntity
impl DefaultEntityPush for ChickenEntity
Source§fn push_snapshot(&self, known_pushable: bool) -> Option<EntityPushSnapshot>
fn push_snapshot(&self, known_pushable: bool) -> Option<EntityPushSnapshot>
None while riding. known_pushable skips the
is_pushable check when the selector has already passed this entity.Source§impl DowncastType for ChickenEntity
impl DowncastType for ChickenEntity
Source§const TYPE_KEY: DowncastTypeKey
const TYPE_KEY: DowncastTypeKey
Source§impl Entity for ChickenEntity
impl Entity for ChickenEntity
Source§fn is_hard_collision_relevant(&self) -> bool
fn is_hard_collision_relevant(&self) -> bool
Source§fn as_default_entity_push(&self) -> Option<&dyn DefaultEntityPush>
fn as_default_entity_push(&self) -> Option<&dyn DefaultEntityPush>
DefaultEntityPush fast path. It is read under the
entity manager lock, so it must give the same answer for the entity’s whole
lifetime and have no side effects.Source§fn base(&self) -> &EntityBase
fn base(&self) -> &EntityBase
Source§fn entity_type(&self) -> EntityTypeRef
fn entity_type(&self) -> EntityTypeRef
Source§fn apply_implicit_item_components(&self, item_stack: &ItemStack)
fn apply_implicit_item_components(&self, item_stack: &ItemStack)
Source§fn dimensions_for_pose(&self, _pose: EntityPose) -> EntityDimensions
fn dimensions_for_pose(&self, _pose: EntityPose) -> EntityDimensions
Source§fn synced_data(&self) -> Option<&dyn EntitySyncedData>
fn synced_data(&self) -> Option<&dyn EntitySyncedData>
Source§fn update_data_before_sync(&self)
fn update_data_before_sync(&self)
Source§fn play_step_sound(&self, _pos: BlockPos, _block_state: BlockStateId)
fn play_step_sound(&self, _pos: BlockPos, _block_state: BlockStateId)
Source§fn is_flapping(&self) -> bool
fn is_flapping(&self) -> bool
Source§fn position_rider(&self, passenger: &dyn Entity)
fn position_rider(&self, passenger: &dyn Entity)
Source§fn save_additional(&self, nbt: &mut NbtCompound)
fn save_additional(&self, nbt: &mut NbtCompound)
Source§fn load_additional(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn load_additional(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
Source§fn is_always_ticking(&self) -> bool
fn is_always_ticking(&self) -> bool
Source§fn broadcast_to_player(&self, _player: &Player) -> bool
fn broadcast_to_player(&self, _player: &Player) -> bool
Source§fn generation(&self) -> EntityGeneration
fn generation(&self) -> EntityGeneration
Source§fn scoreboard_name(&self) -> String
fn scoreboard_name(&self) -> String
Source§fn name(&self) -> TextComponent
fn name(&self) -> TextComponent
Source§fn display_name(&self) -> TextComponent
fn display_name(&self) -> TextComponent
Source§fn plain_text_name(&self) -> String
fn plain_text_name(&self) -> String
Source§fn nbt_for_data_compare(&self) -> NbtCompound
fn nbt_for_data_compare(&self) -> NbtCompound
Source§fn nbt_for_passenger_save(&self) -> Option<NbtCompound>
fn nbt_for_passenger_save(&self) -> Option<NbtCompound>
Source§fn spawn_position(&self) -> DVec3
fn spawn_position(&self) -> DVec3
Source§fn block_position(&self) -> BlockPos
fn block_position(&self) -> BlockPos
Source§fn in_block_state(&self, world: &World) -> BlockStateId
fn in_block_state(&self, world: &World) -> BlockStateId
Source§fn old_position(&self) -> DVec3
fn old_position(&self) -> DVec3
Source§fn bounding_box(&self) -> WorldAabb
fn bounding_box(&self) -> WorldAabb
Source§fn is_free(&self, delta: DVec3) -> bool
fn is_free(&self, delta: DVec3) -> bool
delta is free of block
collisions and liquids.Source§fn blocks_building(&self) -> bool
fn blocks_building(&self) -> bool
Source§fn is_pickable(&self) -> bool
fn is_pickable(&self) -> bool
Source§fn attackable(&self) -> bool
fn attackable(&self) -> bool
Source§fn skip_attack_interaction(&self, _source: &SharedEntity) -> bool
fn skip_attack_interaction(&self, _source: &SharedEntity) -> bool
Source§fn is_pushable(&self) -> bool
fn is_pushable(&self) -> bool
Source§fn is_pushed_by_fluid(&self) -> bool
fn is_pushed_by_fluid(&self) -> bool
Source§fn on_above_bubble_column(&self, drag_down: bool, pos: BlockPos)
fn on_above_bubble_column(&self, drag_down: bool, pos: BlockPos)
Source§fn default_on_above_bubble_column(&self, drag_down: bool, pos: BlockPos)
fn default_on_above_bubble_column(&self, drag_down: bool, pos: BlockPos)
Source§fn on_inside_bubble_column(&self, drag_down: bool)
fn on_inside_bubble_column(&self, drag_down: bool)
Source§fn default_on_inside_bubble_column(&self, drag_down: bool)
fn default_on_inside_bubble_column(&self, drag_down: bool)
Source§fn is_spectator(&self) -> bool
fn is_spectator(&self) -> bool
Source§fn is_ignoring_block_triggers(&self) -> bool
fn is_ignoring_block_triggers(&self) -> bool
Source§fn explosion_indirect_source(&self) -> Option<SharedEntity>
fn explosion_indirect_source(&self) -> Option<SharedEntity>
Source§fn explosion_damage_origin(&self) -> DVec3
fn explosion_damage_origin(&self) -> DVec3
Source§fn ignore_explosion(&self, _explosion: &dyn Explosion) -> bool
fn ignore_explosion(&self, _explosion: &dyn Explosion) -> bool
Source§fn block_explosion_resistance(
&self,
explosion: &dyn Explosion,
world: &World,
pos: BlockPos,
state: BlockStateId,
fluid: FluidState,
resistance: f32,
) -> f32
fn block_explosion_resistance( &self, explosion: &dyn Explosion, world: &World, pos: BlockPos, state: BlockStateId, fluid: FluidState, resistance: f32, ) -> f32
Source§fn should_block_explode(
&self,
explosion: &dyn Explosion,
world: &World,
pos: BlockPos,
state: BlockStateId,
power: f32,
) -> bool
fn should_block_explode( &self, explosion: &dyn Explosion, world: &World, pos: BlockPos, state: BlockStateId, power: f32, ) -> bool
Source§fn on_explosion_hit(&self, _explosion_source: Option<&dyn Entity>)
fn on_explosion_hit(&self, _explosion_source: Option<&dyn Entity>)
Source§fn piston_push_reaction(&self) -> PushReaction
fn piston_push_reaction(&self) -> PushReaction
Source§fn is_supported_by(&self, pos: BlockPos) -> bool
fn is_supported_by(&self, pos: BlockPos) -> bool
pos.Source§fn can_interact_with_level(&self) -> bool
fn can_interact_with_level(&self) -> bool
Source§fn is_invisible(&self) -> bool
fn is_invisible(&self) -> bool
Source§fn is_discrete(&self) -> bool
fn is_discrete(&self) -> bool
Source§fn is_allied_to(&self, _other: &dyn Entity) -> bool
fn is_allied_to(&self, _other: &dyn Entity) -> bool
other.Source§fn is_marker_armor_stand(&self) -> bool
fn is_marker_armor_stand(&self) -> bool
Source§fn is_tame_owned_by(&self, _owner: &dyn LivingEntity) -> bool
fn is_tame_owned_by(&self, _owner: &dyn LivingEntity) -> bool
owner.Source§fn projectile_owner_uuid(&self) -> Option<Uuid>
fn projectile_owner_uuid(&self) -> Option<Uuid>
Projectile owner UUID when this entity exposes one.Source§fn projectile_owner(&self) -> Option<SharedEntity>
fn projectile_owner(&self) -> Option<SharedEntity>
Projectile owner when this entity exposes one.Source§fn is_flying_player(&self) -> bool
fn is_flying_player(&self) -> bool
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
other can collide with this entity. Read moreSource§fn can_be_hit_by_projectile(&self) -> bool
fn can_be_hit_by_projectile(&self) -> bool
Source§fn deflection(&self, _projectile: &dyn Projectile) -> ProjectileDeflection
fn deflection(&self, _projectile: &dyn Projectile) -> ProjectileDeflection
Source§fn vehicle(&self) -> Option<SharedEntity>
fn vehicle(&self) -> Option<SharedEntity>
Source§fn controlled_vehicle(&self) -> Option<SharedEntity>
fn controlled_vehicle(&self) -> Option<SharedEntity>
Source§fn is_passenger(&self) -> bool
fn is_passenger(&self) -> bool
Source§fn can_ride(&self, _vehicle: &dyn Entity) -> bool
fn can_ride(&self, _vehicle: &dyn Entity) -> bool
vehicle.Source§fn stop_riding(&self)
fn stop_riding(&self)
Source§fn eject_passengers(&self)
fn eject_passengers(&self)
Source§fn start_riding(&self, entity_to_ride: &SharedEntity) -> bool
fn start_riding(&self, entity_to_ride: &SharedEntity) -> bool
entity_to_ride if vanilla boarding rules allow it.Source§fn passengers(&self) -> Vec<SharedEntity> ⓘ
fn passengers(&self) -> Vec<SharedEntity> ⓘ
Source§fn count_player_passengers(&self) -> usize
fn count_player_passengers(&self) -> usize
Source§fn has_exactly_one_player_passenger(&self) -> bool
fn has_exactly_one_player_passenger(&self) -> bool
Source§fn first_passenger(&self) -> Option<SharedEntity>
fn first_passenger(&self) -> Option<SharedEntity>
Source§fn controlling_passenger(&self) -> Option<SharedEntity>
fn controlling_passenger(&self) -> Option<SharedEntity>
Source§fn can_control_vehicle(&self) -> bool
fn can_control_vehicle(&self) -> bool
Source§fn has_controlling_passenger(&self) -> bool
fn has_controlling_passenger(&self) -> bool
Source§fn is_vehicle(&self) -> bool
fn is_vehicle(&self) -> bool
Source§fn dismounts_underwater(&self) -> bool
fn dismounts_underwater(&self) -> bool
dismounts_underwater entity type tag.Source§fn has_passenger(&self, passenger: &dyn Entity) -> bool
fn has_passenger(&self, passenger: &dyn Entity) -> bool
passenger is a direct passenger of this entity.Source§fn can_add_passenger(&self, _passenger: &dyn Entity) -> bool
fn can_add_passenger(&self, _passenger: &dyn Entity) -> bool
passenger as a direct passenger.Source§fn could_accept_passenger(&self) -> bool
fn could_accept_passenger(&self) -> bool
Source§fn passenger_index(&self, passenger: &dyn Entity) -> Option<usize>
fn passenger_index(&self, passenger: &dyn Entity) -> Option<usize>
Source§fn vehicle_attachment_point(&self, _vehicle: &dyn Entity) -> DVec3
fn vehicle_attachment_point(&self, _vehicle: &dyn Entity) -> DVec3
Source§fn default_passenger_attachment_point(&self, passenger: &dyn Entity) -> DVec3
fn default_passenger_attachment_point(&self, passenger: &dyn Entity) -> DVec3
Source§fn passenger_attachment_point(&self, passenger: &dyn Entity) -> DVec3
fn passenger_attachment_point(&self, passenger: &dyn Entity) -> DVec3
Source§fn passenger_riding_position(&self, passenger: &dyn Entity) -> DVec3
fn passenger_riding_position(&self, passenger: &dyn Entity) -> DVec3
passenger should ride this vehicle.Source§fn root_vehicle_id(&self) -> i32
fn root_vehicle_id(&self) -> i32
Source§fn root_vehicle(&self) -> Option<SharedEntity>
fn root_vehicle(&self) -> Option<SharedEntity>
Source§fn is_passenger_of_same_vehicle(&self, other: &dyn Entity) -> bool
fn is_passenger_of_same_vehicle(&self, other: &dyn Entity) -> bool
other share the same root vehicle.Source§fn has_indirect_passenger(&self, entity: &dyn Entity) -> bool
fn has_indirect_passenger(&self, entity: &dyn Entity) -> bool
entity is an indirect passenger of this entity.Source§fn can_collide_with(&self, other: &dyn Entity) -> bool
fn can_collide_with(&self, other: &dyn Entity) -> bool
other.Source§fn push_impulse(&self, impulse: DVec3)
fn push_impulse(&self, impulse: DVec3)
Source§fn push_entity(&self, entity: &dyn Entity)
fn push_entity(&self, entity: &dyn Entity)
Source§fn make_bounding_box_at(&self, position: DVec3) -> WorldAabb
fn make_bounding_box_at(&self, position: DVec3) -> WorldAabb
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
Source§fn default_tick(&self)
fn default_tick(&self)
super.tick() should call this
rather than calling Self::base_tick directly.Source§fn tick(self: Arc<Self>)
fn tick(self: Arc<Self>)
Source§fn ride_tick(self: Arc<Self>)
fn ride_tick(self: Arc<Self>)
Source§fn default_ride_tick(self: Arc<Self>)
fn default_ride_tick(self: Arc<Self>)
Entity.rideTick when not overridden.Source§fn handle_portal(&self)
fn handle_portal(&self)
Entity.handlePortal behavior currently implemented by Steel.Source§fn entity_base_tick(&self)
fn entity_base_tick(&self)
Entity.baseTick behavior. Read moreSource§fn check_below_world(&self)
fn check_below_world(&self)
Source§fn on_below_world(&self)
fn on_below_world(&self)
Source§fn check_despawn(&self)
fn check_despawn(&self)
Source§fn apply_inside_block_effect(&self, effect_type: InsideBlockEffectType)
fn apply_inside_block_effect(&self, effect_type: InsideBlockEffectType)
Source§fn pack_dirty_entity_data(&self) -> Option<Vec<DataValue>>
fn pack_dirty_entity_data(&self) -> Option<Vec<DataValue>>
Source§fn pack_all_entity_data(&self) -> Vec<DataValue>
fn pack_all_entity_data(&self) -> Vec<DataValue>
Source§fn is_removed(&self) -> bool
fn is_removed(&self) -> bool
Source§fn is_alive(&self) -> bool
fn is_alive(&self) -> bool
Source§fn begin_pending_world_change(&self) -> Option<PendingWorldChangeToken>
fn begin_pending_world_change(&self) -> Option<PendingWorldChangeToken>
Source§fn finish_pending_world_change(&self, token: PendingWorldChangeToken) -> bool
fn finish_pending_world_change(&self, token: PendingWorldChangeToken) -> bool
Source§fn is_world_change_pending(&self) -> bool
fn is_world_change_pending(&self) -> bool
Source§fn is_world_change_token_pending(&self, token: PendingWorldChangeToken) -> bool
fn is_world_change_token_pending(&self, token: PendingWorldChangeToken) -> bool
Source§fn can_use_portal(&self, ignore_passenger: bool) -> bool
fn can_use_portal(&self, ignore_passenger: bool) -> bool
Source§fn dimension_changing_delay(&self) -> i32
fn dimension_changing_delay(&self) -> i32
Source§fn removal_reason(&self) -> Option<RemovalReason>
fn removal_reason(&self) -> Option<RemovalReason>
Source§fn set_removed(&self, reason: RemovalReason)
fn set_removed(&self, reason: RemovalReason)
Source§fn game_event_with_source_entity(
&self,
event: GameEventRef,
source_entity: Option<&dyn Entity>,
)
fn game_event_with_source_entity( &self, event: GameEventRef, source_entity: Option<&dyn Entity>, )
Source§fn game_event(&self, event: GameEventRef)
fn game_event(&self, event: GameEventRef)
Source§fn kill(&self, world: &World)
fn kill(&self, world: &World)
Source§fn restore_owner_reference(&self, _owner: &SharedEntity)
fn restore_owner_reference(&self, _owner: &SharedEntity)
Source§fn on_teleported(&self)
fn on_teleported(&self)
Source§fn set_level_callback(&self, callback: Arc<dyn EntityLevelCallback>)
fn set_level_callback(&self, callback: Arc<dyn EntityLevelCallback>)
Source§fn notify_leash_holder(&self, _leashable: &dyn Entity)
fn notify_leash_holder(&self, _leashable: &dyn Entity)
Source§fn notify_leashee_removed(&self, _leashable: &dyn Entity)
fn notify_leashee_removed(&self, _leashable: &dyn Entity)
Source§fn player_touch(self: Arc<Self>, _player: &Arc<Player>)
fn player_touch(self: Arc<Self>, _player: &Arc<Player>)
Source§fn leashables_leashed_to(&self) -> Vec<SharedEntity> ⓘ
fn leashables_leashed_to(&self) -> Vec<SharedEntity> ⓘ
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> ⓘ
holder.Source§fn transfer_leashables_from_holder(&self, old_holder: &dyn Entity) -> bool
fn transfer_leashables_from_holder(&self, old_holder: &dyn Entity) -> bool
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
Source§fn shear_off_all_leash_connections(&self, player: Option<&Player>) -> bool
fn shear_off_all_leash_connections(&self, player: Option<&Player>) -> bool
Source§fn attempt_to_shear_equipment(
&self,
player: &Player,
hand: InteractionHand,
) -> bool
fn attempt_to_shear_equipment( &self, player: &Player, hand: InteractionHand, ) -> bool
Source§fn interact(
&self,
player: &Player,
hand: InteractionHand,
location: DVec3,
) -> InteractionResult
fn interact( &self, player: &Player, hand: InteractionHand, location: DVec3, ) -> InteractionResult
Source§fn interact_entity(
&self,
player: &Player,
hand: InteractionHand,
_location: DVec3,
) -> InteractionResult
fn interact_entity( &self, player: &Player, hand: InteractionHand, _location: DVec3, ) -> InteractionResult
Source§fn is_living_entity(&self) -> bool
fn is_living_entity(&self) -> bool
Source§fn is_abstract_arrow(&self) -> bool
fn is_abstract_arrow(&self) -> bool
AbstractArrow hierarchy.Source§fn as_projectile(&self) -> Option<&dyn Projectile>
fn as_projectile(&self) -> Option<&dyn Projectile>
Source§fn as_living_entity(&self) -> Option<&dyn LivingEntity>
fn as_living_entity(&self) -> Option<&dyn LivingEntity>
Source§fn as_item_frame(&self) -> Option<&dyn ItemFrame>
fn as_item_frame(&self) -> Option<&dyn ItemFrame>
Source§fn as_player(&self) -> Option<&Player>
fn as_player(&self) -> Option<&Player>
Source§fn with_weapon_item(&self, visitor: &mut dyn FnMut(Option<&ItemStack>))
fn with_weapon_item(&self, visitor: &mut dyn FnMut(Option<&ItemStack>))
Entity.getWeaponItem without copying inventory state.Source§fn is_pathfinder_mob(&self) -> bool
fn is_pathfinder_mob(&self) -> bool
Source§fn as_pathfinder_mob(&self) -> Option<&dyn PathfinderMob>
fn as_pathfinder_mob(&self) -> Option<&dyn PathfinderMob>
Source§fn as_leashable(&self) -> Option<&dyn Leashable>
fn as_leashable(&self) -> Option<&dyn Leashable>
Leashable if it has Leashable behavior.Source§fn as_abstract_minecart(&self) -> Option<&dyn AbstractMinecart>
fn as_abstract_minecart(&self) -> Option<&dyn AbstractMinecart>
AbstractMinecart if it has AbstractMinecart behavior.Source§fn as_animal(&self) -> Option<&dyn Animal>
fn as_animal(&self) -> Option<&dyn Animal>
Source§fn is_monster(&self) -> bool
fn is_monster(&self) -> bool
Source§fn as_monster(&self) -> Option<&dyn Monster>
fn as_monster(&self) -> Option<&dyn Monster>
Monster capability, equivalent to vanilla’s instanceof Monster.Source§fn as_enemy(&self) -> Option<&dyn Enemy>
fn as_enemy(&self) -> Option<&dyn Enemy>
Enemy marker, equivalent to vanilla’s instanceof Enemy.Source§fn is_ageable_mob(&self) -> bool
fn is_ageable_mob(&self) -> bool
Source§fn as_ageable_mob(&self) -> Option<&dyn AgeableMob>
fn as_ageable_mob(&self) -> Option<&dyn AgeableMob>
Source§fn is_item_steerable(&self) -> bool
fn is_item_steerable(&self) -> bool
Source§fn as_item_steerable(&self) -> Option<&dyn ItemSteerable>
fn as_item_steerable(&self) -> Option<&dyn ItemSteerable>
Source§fn forces_fall_flying_velocity_sync(&self) -> bool
fn forces_fall_flying_velocity_sync(&self) -> bool
Source§fn uses_client_movement_packets(&self) -> bool
fn uses_client_movement_packets(&self) -> bool
Source§fn is_server_driven_movement(&self) -> bool
fn is_server_driven_movement(&self) -> bool
Source§fn can_simulate_movement(&self) -> bool
fn can_simulate_movement(&self) -> bool
Source§fn is_effective_ai(&self) -> bool
fn is_effective_ai(&self) -> bool
Source§fn is_suppressing_bounce(&self) -> bool
fn is_suppressing_bounce(&self) -> bool
Source§fn is_stepping_carefully(&self) -> bool
fn is_stepping_carefully(&self) -> bool
Source§fn is_descending(&self) -> bool
fn is_descending(&self) -> bool
Source§fn update_swimming(&self)
fn update_swimming(&self)
Source§fn default_update_swimming(&self)
fn default_update_swimming(&self)
Entity.updateSwimming for player overrides.Source§fn is_flying_vehicle(&self) -> bool
fn is_flying_vehicle(&self) -> bool
Source§fn on_climbable(&self) -> bool
fn on_climbable(&self) -> bool
Source§fn default_known_movement(&self) -> DVec3
fn default_known_movement(&self) -> DVec3
Source§fn known_movement(&self) -> DVec3
fn known_movement(&self) -> DVec3
Source§fn known_speed(&self) -> DVec3
fn known_speed(&self) -> DVec3
getKnownSpeed.Source§fn tick_count(&self) -> i32
fn tick_count(&self) -> i32
Source§fn is_first_tick(&self) -> bool
fn is_first_tick(&self) -> bool
Source§fn set_first_tick(&self, first_tick: bool)
fn set_first_tick(&self, first_tick: bool)
Source§fn advance_tick_count(&self)
fn advance_tick_count(&self)
Source§fn fall_sounds(&self) -> (SoundEventRef, SoundEventRef)
fn fall_sounds(&self) -> (SoundEventRef, SoundEventRef)
Source§fn rotation(&self) -> (f32, f32)
fn rotation(&self) -> (f32, f32)
Source§fn set_rotation(&self, rotation: (f32, f32))
fn set_rotation(&self, rotation: (f32, f32))
Source§fn direction_yaw(&self) -> Direction
fn direction_yaw(&self) -> Direction
Source§fn motion_direction(&self) -> Direction
fn motion_direction(&self) -> Direction
Source§fn look_at(&self, from_anchor: EntityAnchor, target: DVec3)
fn look_at(&self, from_anchor: EntityAnchor, target: DVec3)
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, )
Source§fn spawn_data(&self) -> i32
fn spawn_data(&self) -> i32
Source§fn get_eye_height(&self) -> f64
fn get_eye_height(&self) -> f64
Source§fn get_fluid_jump_threshold(&self) -> f64
fn get_fluid_jump_threshold(&self) -> f64
Source§fn is_in_wall(&self) -> bool
fn is_in_wall(&self) -> bool
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
Source§fn look_angle(&self) -> DVec3
fn look_angle(&self) -> DVec3
Source§fn hand_holding_item_angle(&self, item: ItemRef) -> DVec3
fn hand_holding_item_angle(&self, item: ItemRef) -> DVec3
item. Read moreSource§fn set_velocity(&self, velocity: DVec3)
fn set_velocity(&self, velocity: DVec3)
Source§fn needs_velocity_sync(&self) -> bool
fn needs_velocity_sync(&self) -> bool
Source§fn mark_velocity_sync(&self)
fn mark_velocity_sync(&self)
Source§fn clear_velocity_sync(&self)
fn clear_velocity_sync(&self)
Source§fn hurt_marked(&self) -> bool
fn hurt_marked(&self) -> bool
Source§fn clear_hurt_mark(&self)
fn clear_hurt_mark(&self)
Source§fn fall_distance(&self) -> f64
fn fall_distance(&self) -> f64
Source§fn is_in_powder_snow(&self) -> bool
fn is_in_powder_snow(&self) -> bool
Source§fn was_in_powder_snow(&self) -> bool
fn was_in_powder_snow(&self) -> bool
Source§fn set_fall_distance(&self, fall_distance: f64)
fn set_fall_distance(&self, fall_distance: f64)
Source§fn reset_fall_distance(&self)
fn reset_fall_distance(&self)
Source§fn check_fall_distance_accumulation(&self)
fn check_fall_distance_accumulation(&self)
Source§fn fire_freeze_state(&self) -> EntityFireFreezeState
fn fire_freeze_state(&self) -> EntityFireFreezeState
Source§fn remaining_fire_ticks(&self) -> i32
fn remaining_fire_ticks(&self) -> i32
Source§fn set_remaining_fire_ticks(&self, remaining_fire_ticks: i32)
fn set_remaining_fire_ticks(&self, remaining_fire_ticks: i32)
Source§fn ticks_frozen(&self) -> i32
fn ticks_frozen(&self) -> i32
Source§fn set_ticks_frozen(&self, ticks_frozen: i32)
fn set_ticks_frozen(&self, ticks_frozen: i32)
Source§fn fire_immune(&self) -> bool
fn fire_immune(&self) -> bool
Source§fn fire_immune_ticks(&self) -> i32
fn fire_immune_ticks(&self) -> i32
Source§fn should_play_lava_hurt_sound(&self) -> bool
fn should_play_lava_hurt_sound(&self) -> bool
Source§fn lava_ignite(&self)
fn lava_ignite(&self)
Source§fn remaining_fire_ticks_cap(&self) -> Option<i32>
fn remaining_fire_ticks_cap(&self) -> Option<i32>
None means unlimited.Source§fn fire_ignite_extra_ticks(&self) -> i32
fn fire_ignite_extra_ticks(&self) -> i32
Source§fn is_on_fire(&self) -> bool
fn is_on_fire(&self) -> bool
Source§fn has_visual_fire(&self) -> bool
fn has_visual_fire(&self) -> bool
Source§fn is_freezing(&self) -> bool
fn is_freezing(&self) -> bool
Source§fn default_can_freeze(&self) -> bool
fn default_can_freeze(&self) -> bool
Entity.canFreeze() without living-equipment overrides.Source§fn can_freeze(&self) -> bool
fn can_freeze(&self) -> bool
Source§fn ticks_required_to_freeze(&self) -> i32
fn ticks_required_to_freeze(&self) -> i32
Source§fn is_fully_frozen(&self) -> bool
fn is_fully_frozen(&self) -> bool
Source§fn percent_frozen(&self) -> f32
fn percent_frozen(&self) -> f32
Source§fn clear_freeze(&self)
fn clear_freeze(&self)
Source§fn clear_fire(&self)
fn clear_fire(&self)
Source§fn extinguish_fire(&self)
fn extinguish_fire(&self)
Source§fn ignite_for_ticks(&self, number_of_ticks: i32)
fn ignite_for_ticks(&self, number_of_ticks: i32)
Source§fn sync_base_fire_freeze_entity_data(&self)
fn sync_base_fire_freeze_entity_data(&self)
Source§fn sync_base_entity_data(&self)
fn sync_base_entity_data(&self)
Source§fn is_in_water(&self) -> bool
fn is_in_water(&self) -> bool
Source§fn is_in_rain(&self) -> bool
fn is_in_rain(&self) -> bool
Source§fn is_in_water_or_rain(&self) -> bool
fn is_in_water_or_rain(&self) -> bool
Source§fn is_in_lava(&self) -> bool
fn is_in_lava(&self) -> bool
Source§fn is_eye_in_water(&self) -> bool
fn is_eye_in_water(&self) -> bool
Source§fn is_eye_in_lava(&self) -> bool
fn is_eye_in_lava(&self) -> bool
Source§fn is_under_water(&self) -> bool
fn is_under_water(&self) -> bool
Source§fn fluid_contact(&self) -> EntityFluidContact
fn fluid_contact(&self) -> EntityFluidContact
Source§fn refresh_fluid_contact(&self) -> EntityFluidContact
fn refresh_fluid_contact(&self) -> EntityFluidContact
Source§fn update_fluid_interaction(&self) -> bool
fn update_fluid_interaction(&self) -> bool
Entity.updateFluidInteraction: refreshes cached contact,
emits the water-entry splash on transition, resets fall distance in
water, and applies fluid currents. Read moreSource§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
Source§fn apply_fluid_current_impulses(
&self,
world: &Arc<World>,
contact: EntityFluidContact,
)
fn apply_fluid_current_impulses( &self, world: &Arc<World>, contact: EntityFluidContact, )
Source§fn apply_fluid_current_impulse(&self, impulse: DVec3)
fn apply_fluid_current_impulse(&self, impulse: DVec3)
Source§fn is_fall_damage_immune(&self) -> bool
fn is_fall_damage_immune(&self) -> bool
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, )
Source§fn cause_fall_damage(
self: Arc<Self>,
fall_distance: f64,
damage_modifier: f32,
source: &DamageSource,
) -> bool
fn cause_fall_damage( self: Arc<Self>, fall_distance: f64, damage_modifier: f32, source: &DamageSource, ) -> bool
Source§fn horizontal_collision(&self) -> bool
fn horizontal_collision(&self) -> bool
Source§fn vertical_collision(&self) -> bool
fn vertical_collision(&self) -> bool
Source§fn vertical_collision_below(&self) -> bool
fn vertical_collision_below(&self) -> bool
Source§fn no_physics(&self) -> bool
fn no_physics(&self) -> bool
Source§fn is_affected_by_blocks(&self) -> bool
fn is_affected_by_blocks(&self) -> bool
Source§fn set_no_physics(&self, no_physics: bool)
fn set_no_physics(&self, no_physics: bool)
Source§fn update_no_physics_from_current_collision(&self)
fn update_no_physics_from_current_collision(&self)
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)
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, )
Source§fn make_stuck_in_block(&self, state: BlockStateId, speed_multiplier: DVec3)
fn make_stuck_in_block(&self, state: BlockStateId, speed_multiplier: DVec3)
Source§fn apply_effects_from_blocks(&self)
fn apply_effects_from_blocks(&self)
Source§fn apply_effects_from_blocks_between(&self, from: DVec3, to: DVec3)
fn apply_effects_from_blocks_between(&self, from: DVec3, to: DVec3)
Source§fn apply_effects_from_blocks_for_last_movements(&self)
fn apply_effects_from_blocks_for_last_movements(&self)
Source§fn land_after_teleport(&self)
fn land_after_teleport(&self)
/teleport does once an entity has moved: unless it is gliding, it ends up
on the ground without vertical motion.Source§fn set_on_ground(&self, on_ground: bool)
fn set_on_ground(&self, on_ground: bool)
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, )
Source§fn default_apply_accepted_client_movement(
self: Arc<Self>,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn default_apply_accepted_client_movement( self: Arc<Self>, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Source§fn apply_accepted_client_movement(
self: Arc<Self>,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn apply_accepted_client_movement( self: Arc<Self>, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Source§fn apply_accepted_client_vehicle_movement(
self: Arc<Self>,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn apply_accepted_client_vehicle_movement( self: Arc<Self>, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Source§fn try_set_position(&self, pos: DVec3) -> Result<(), EntityMoveError>
fn try_set_position(&self, pos: DVec3) -> Result<(), EntityMoveError>
Source§fn try_set_position_base(&self, pos: DVec3) -> Result<(), EntityMoveError>
fn try_set_position_base(&self, pos: DVec3) -> Result<(), EntityMoveError>
Source§fn teleport_to(&self, pos: DVec3) -> Result<(), EntityMoveError>
fn teleport_to(&self, pos: DVec3) -> Result<(), EntityMoveError>
pos, keeping its current rotation.Source§fn set_old_position_to_current(&self)
fn set_old_position_to_current(&self)
Source§fn set_old_position(&self, old_position: DVec3)
fn set_old_position(&self, old_position: DVec3)
Source§fn remove_latest_movement_recording(&self)
fn remove_latest_movement_recording(&self)
Source§fn on_pos(&self, offset: f32) -> Option<BlockPos>
fn on_pos(&self, offset: f32) -> Option<BlockPos>
Source§fn block_pos_below_that_affects_movement(&self) -> Option<BlockPos>
fn block_pos_below_that_affects_movement(&self) -> Option<BlockPos>
Source§fn on_pos_legacy(&self) -> Option<BlockPos>
fn on_pos_legacy(&self) -> Option<BlockPos>
getOnPosLegacy(), used by fall/step block hooks.Source§fn default_block_speed_factor(&self) -> f32
fn default_block_speed_factor(&self) -> f32
Source§fn block_speed_factor(&self) -> f32
fn block_speed_factor(&self) -> f32
Source§fn block_jump_factor(&self) -> f32
fn block_jump_factor(&self) -> f32
Source§fn pose(&self) -> EntityPose
fn pose(&self) -> EntityPose
Source§fn refresh_dimensions(&self)
fn refresh_dimensions(&self)
Source§fn fudge_position_after_size_change(
&self,
previous_dimensions: EntityDimensions,
) -> bool
fn fudge_position_after_size_change( &self, previous_dimensions: EntityDimensions, ) -> bool
ThrownEgg hatchlings also use it to fit a newborn chick at the
egg’s impact point.Source§fn set_pose(&self, pose: EntityPose)
fn set_pose(&self, pose: EntityPose)
Source§fn is_crouching(&self) -> bool
fn is_crouching(&self) -> bool
Source§fn is_swimming(&self) -> bool
fn is_swimming(&self) -> bool
Source§fn is_on_rails(&self) -> bool
fn is_on_rails(&self) -> bool
Source§fn is_state_climbable(&self, state: BlockStateId) -> bool
fn is_state_climbable(&self, state: BlockStateId) -> bool
Source§fn movement_emission(&self) -> EntityMovementEmission
fn movement_emission(&self) -> EntityMovementEmission
Source§fn may_interact(&self, _world: &World, _pos: BlockPos) -> bool
fn may_interact(&self, _world: &World, _pos: BlockPos) -> bool
Source§fn air_supply(&self) -> i32
fn air_supply(&self) -> i32
Source§fn set_air_supply(&self, air_supply: i32)
fn set_air_supply(&self, air_supply: i32)
Source§fn max_air_supply(&self) -> i32
fn max_air_supply(&self) -> i32
Source§fn portal_cooldown(&self) -> i32
fn portal_cooldown(&self) -> i32
Source§fn set_portal_cooldown(&self, portal_cooldown: i32)
fn set_portal_cooldown(&self, portal_cooldown: i32)
Source§fn is_on_portal_cooldown(&self) -> bool
fn is_on_portal_cooldown(&self) -> bool
Source§fn reset_portal_cooldown(&self)
fn reset_portal_cooldown(&self)
Source§fn set_as_inside_portal(&self, portal: PortalKind, entry_position: BlockPos)
fn set_as_inside_portal(&self, portal: PortalKind, entry_position: BlockPos)
Source§fn custom_name(&self) -> Option<TextComponent>
fn custom_name(&self) -> Option<TextComponent>
Source§fn set_custom_name(&self, custom_name: Option<TextComponent>)
fn set_custom_name(&self, custom_name: Option<TextComponent>)
Source§fn is_custom_name_visible(&self) -> bool
fn is_custom_name_visible(&self) -> bool
Source§fn set_custom_name_visible(&self, visible: bool)
fn set_custom_name_visible(&self, visible: bool)
Source§fn has_glowing_tag(&self) -> bool
fn has_glowing_tag(&self) -> bool
Source§fn set_glowing_tag(&self, glowing: bool)
fn set_glowing_tag(&self, glowing: bool)
Source§fn remove_tag(&self, tag: &str) -> bool
fn remove_tag(&self, tag: &str) -> bool
Source§fn custom_data(&self) -> NbtCompound
fn custom_data(&self) -> NbtCompound
Source§fn set_custom_data(&self, custom_data: NbtCompound)
fn set_custom_data(&self, custom_data: NbtCompound)
Source§fn sound_source(&self) -> SoundSource
fn sound_source(&self) -> SoundSource
Source§fn swim_sound(&self) -> SoundEventRef
fn swim_sound(&self) -> SoundEventRef
Source§fn set_silent(&self, silent: bool)
fn set_silent(&self, silent: bool)
Source§fn broadcast_entity_event(&self, event: EntityStatus)
fn broadcast_entity_event(&self, event: EntityStatus)
Source§fn play_sound(&self, sound: SoundEventRef, volume: f32, pitch: f32)
fn play_sound(&self, sound: SoundEventRef, volume: f32, pitch: f32)
Source§fn swim_splash_sound(&self) -> SoundEventRef
fn swim_splash_sound(&self) -> SoundEventRef
Source§fn swim_high_speed_splash_sound(&self) -> SoundEventRef
fn swim_high_speed_splash_sound(&self) -> SoundEventRef
Source§fn do_water_splash_effect(&self)
fn do_water_splash_effect(&self)
SPLASH.Source§fn default_do_water_splash_effect(&self)
fn default_do_water_splash_effect(&self)
Entity.doWaterSplashEffect when not overridden.Source§fn play_entity_on_fire_extinguished_sound(&self)
fn play_entity_on_fire_extinguished_sound(&self)
Source§fn play_block_step_sound(&self, block_state: BlockStateId)
fn play_block_step_sound(&self, block_state: BlockStateId)
Source§fn play_muffled_step_sound(&self, block_state: BlockStateId)
fn play_muffled_step_sound(&self, block_state: BlockStateId)
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, )
Source§fn walking_step_sound(&self, pos: BlockPos, block_state: BlockStateId)
fn walking_step_sound(&self, pos: BlockPos, block_state: BlockStateId)
Source§fn play_amethyst_step_sound(&self)
fn play_amethyst_step_sound(&self)
Source§fn water_swim_sound(&self)
fn water_swim_sound(&self)
Source§fn play_swim_sound(&self, volume: f32)
fn play_swim_sound(&self, volume: f32)
Source§fn process_flapping_movement(&self)
fn process_flapping_movement(&self)
Source§fn next_step(&self) -> f32
fn next_step(&self) -> f32
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, )
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, )
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
Source§fn max_up_step(&self) -> f32
fn max_up_step(&self) -> f32
Source§fn backs_off_from_edge(&self) -> bool
fn backs_off_from_edge(&self) -> bool
Source§fn get_default_gravity(&self) -> f64
fn get_default_gravity(&self) -> f64
Source§fn is_no_gravity(&self) -> bool
fn is_no_gravity(&self) -> bool
Source§fn set_no_gravity(&self, no_gravity: bool)
fn set_no_gravity(&self, no_gravity: bool)
Source§fn is_invulnerable(&self) -> bool
fn is_invulnerable(&self) -> bool
Source§fn set_invulnerable(&self, invulnerable: bool)
fn set_invulnerable(&self, invulnerable: bool)
Source§fn get_gravity(&self) -> f64
fn get_gravity(&self) -> f64
Source§fn get_air_drag(&self) -> f64
fn get_air_drag(&self) -> f64
Source§fn apply_gravity(&self)
fn apply_gravity(&self)
Source§fn move_relative(&self, speed: f32, input: DVec3)
fn move_relative(&self, speed: f32, input: DVec3)
input scaled by speed, rotated to face this entity’s current
yaw, to its velocity.Source§fn move_without_physics(&self, delta: DVec3) -> Option<MoveResult>
fn move_without_physics(&self, delta: DVec3) -> Option<MoveResult>
Source§fn default_move_entity(
self: Arc<Self>,
mover_type: MoverType,
delta: DVec3,
) -> Option<MoveResult>
fn default_move_entity( self: Arc<Self>, mover_type: MoverType, delta: DVec3, ) -> Option<MoveResult>
Source§fn move_entity(
self: Arc<Self>,
mover_type: MoverType,
delta: DVec3,
) -> Option<MoveResult>
fn move_entity( self: Arc<Self>, mover_type: MoverType, delta: DVec3, ) -> Option<MoveResult>
Source§fn apply_fall_damage_after_move(
self: Arc<Self>,
result: &MoveResult,
world: &Arc<World>,
) -> bool
fn apply_fall_damage_after_move( self: Arc<Self>, result: &MoveResult, world: &Arc<World>, ) -> bool
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, )
Source§fn do_check_fall_damage(
self: Arc<Self>,
movement: DVec3,
on_ground: bool,
world: &Arc<World>,
) -> bool
fn do_check_fall_damage( self: Arc<Self>, movement: DVec3, on_ground: bool, world: &Arc<World>, ) -> bool
Source§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, )
Source§fn send_landing_particles(
&self,
world: &World,
on_state: BlockStateId,
pos: BlockPos,
)
fn send_landing_particles( &self, world: &World, on_state: BlockStateId, pos: BlockPos, )
Source§fn check_fall_damage(
self: Arc<Self>,
vertical_movement: f64,
on_ground: bool,
on_state: BlockStateId,
pos: BlockPos,
world: &Arc<World>,
)
fn check_fall_damage( self: Arc<Self>, vertical_movement: f64, on_ground: bool, on_state: BlockStateId, pos: BlockPos, world: &Arc<World>, )
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
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
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>>
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>>
Source§fn apply_spawn_data(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn apply_spawn_data(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
Source§fn is_invulnerable_to_base(&self, source: &DamageSource) -> bool
fn is_invulnerable_to_base(&self, source: &DamageSource) -> bool
source: already
removed, or invulnerable and the source doesn’t bypass invulnerability.Source§fn hurt(&self, world: &World, source: &DamageSource, amount: f32) -> bool
fn hurt(&self, world: &World, source: &DamageSource, amount: f32) -> bool
Source§fn distance_to_sqr(&self, pos: DVec3) -> f64
fn distance_to_sqr(&self, pos: DVec3) -> f64
Source§fn snap_to(&self, position: DVec3, yaw: f32, pitch: f32)
fn snap_to(&self, position: DVec3, yaw: f32, pitch: f32)
Source§fn killed_entity(
&self,
_world: &World,
_entity: &dyn LivingEntity,
_source: &DamageSource,
) -> bool
fn killed_entity( &self, _world: &World, _entity: &dyn LivingEntity, _source: &DamageSource, ) -> bool
Source§fn award_kill_score(&self, _victim: &dyn Entity, _killing_blow: &DamageSource)
fn award_kill_score(&self, _victim: &dyn Entity, _killing_blow: &DamageSource)
Source§impl LivingEntity for ChickenEntity
impl LivingEntity for ChickenEntity
Source§fn living_base(&self) -> &LivingEntityBase
fn living_base(&self) -> &LivingEntityBase
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
Source§fn set_health(&self, health: f32)
fn set_health(&self, health: f32)
Source§fn hurt_sound(&self, _source: &DamageSource) -> Option<SoundEventRef>
fn hurt_sound(&self, _source: &DamageSource) -> Option<SoundEventRef>
Source§fn death_sound(&self) -> Option<SoundEventRef>
fn death_sound(&self) -> Option<SoundEventRef>
Source§fn chicken_loot_variant(&self) -> Option<&Identifier>
fn chicken_loot_variant(&self) -> Option<&Identifier>
minecraft:components.chicken/variant key for the
entity loot context, when it is a chicken. Read moreSource§fn base_experience_reward(&self) -> i32
fn base_experience_reward(&self) -> i32
Source§fn server_ai_step(&self, entity: &SharedEntity)
fn server_ai_step(&self, entity: &SharedEntity)
LivingEntity.aiStep().Source§fn ai_step(&self, entity: &SharedEntity) -> Option<MoveResult>
fn ai_step(&self, entity: &SharedEntity) -> Option<MoveResult>
Source§fn living_rotation_state(&self) -> LivingRotationState
fn living_rotation_state(&self) -> LivingRotationState
Source§fn y_body_rot(&self) -> f32
fn y_body_rot(&self) -> f32
Source§fn set_y_body_rot(&self, y_body_rot: f32)
fn set_y_body_rot(&self, y_body_rot: f32)
Source§fn y_head_rot(&self) -> f32
fn y_head_rot(&self) -> f32
Source§fn set_y_head_rot(&self, y_head_rot: f32)
fn set_y_head_rot(&self, y_head_rot: f32)
Source§fn advance_living_rotation_for_base_tick(&self)
fn advance_living_rotation_for_base_tick(&self)
Source§fn base_tick_living_entity(&self)
fn base_tick_living_entity(&self)
Source§fn living_swing_state(&self) -> LivingSwingState
fn living_swing_state(&self) -> LivingSwingState
Source§fn modified_swing_duration(&self, animation: SwingAnimation) -> i32
fn modified_swing_duration(&self, animation: SwingAnimation) -> i32
Source§fn attack_animation(&self, hand: InteractionHand) -> SwingAnimation
fn attack_animation(&self, hand: InteractionHand) -> SwingAnimation
Source§fn interact_animation(&self, hand: InteractionHand) -> SwingAnimation
fn interact_animation(&self, hand: InteractionHand) -> SwingAnimation
Source§fn held_swing_animation(
&self,
hand: InteractionHand,
component: DataComponentType<SwingAnimation>,
) -> SwingAnimation
fn held_swing_animation( &self, hand: InteractionHand, component: DataComponentType<SwingAnimation>, ) -> SwingAnimation
hand, falling
back to the vanilla default when the item does not carry one.Source§fn swing(
&self,
hand: InteractionHand,
animation: SwingAnimation,
update_self: bool,
) -> bool
fn swing( &self, hand: InteractionHand, animation: SwingAnimation, update_self: bool, ) -> bool
Source§fn swing_for_attack(&self, hand: InteractionHand)
fn swing_for_attack(&self, hand: InteractionHand)
Source§fn attributes(&self) -> &SyncMutex<AttributeMap>
fn attributes(&self) -> &SyncMutex<AttributeMap>
Source§fn get_luck(&self) -> f32
fn get_luck(&self) -> f32
LivingEntity.getLuck - non-players contribute no luck to loot.Source§fn pack_syncable_attributes(&self) -> Vec<AttributeSnapshot>
fn pack_syncable_attributes(&self) -> Vec<AttributeSnapshot>
Source§fn drain_dirty_syncable_attributes(&self) -> Vec<AttributeSnapshot>
fn drain_dirty_syncable_attributes(&self) -> Vec<AttributeSnapshot>
Source§fn drain_dirty_mob_effects(&self) -> Vec<MobEffectSyncChange>
fn drain_dirty_mob_effects(&self) -> Vec<MobEffectSyncChange>
Source§fn pack_all_equipment(&self) -> Vec<EquipmentSlotItem>
fn pack_all_equipment(&self) -> Vec<EquipmentSlotItem>
Source§fn drain_dirty_equipment(&self) -> Vec<EquipmentSlotItem>
fn drain_dirty_equipment(&self) -> Vec<EquipmentSlotItem>
Source§fn save_equipment(&self, nbt: &mut NbtCompound)
fn save_equipment(&self, nbt: &mut NbtCompound)
Source§fn load_equipment(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn load_equipment(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
Source§fn save_command_nbt(&self, nbt: &mut NbtCompound)
fn save_command_nbt(&self, nbt: &mut NbtCompound)
Source§fn get_max_health(&self) -> f32
fn get_max_health(&self) -> f32
Source§fn no_action_time(&self) -> i32
fn no_action_time(&self) -> i32
Source§fn set_no_action_time(&self, no_action_time: i32)
fn set_no_action_time(&self, no_action_time: i32)
Source§fn increment_no_action_time(&self)
fn increment_no_action_time(&self)
Source§fn is_dead_or_dying(&self) -> bool
fn is_dead_or_dying(&self) -> bool
Source§fn sheep_loot_state(&self) -> Option<(DyeColor, bool)>
fn sheep_loot_state(&self) -> Option<(DyeColor, bool)>
minecraft:components.sheep/color
together with minecraft:type_specific/sheep.sheared), when this entity is a sheep. Read moreSource§fn sound_volume(&self) -> f32
fn sound_volume(&self) -> f32
Source§fn voice_pitch(&self) -> f32
fn voice_pitch(&self) -> f32
Source§fn default_voice_pitch(&self) -> f32
fn default_voice_pitch(&self) -> f32
Source§fn make_sound(&self, sound: Option<SoundEventRef>)
fn make_sound(&self, sound: Option<SoundEventRef>)
sound at this entity’s current volume and pitch, if any.Source§fn play_hurt_sound(&self, source: &DamageSource)
fn play_hurt_sound(&self, source: &DamageSource)
Source§fn play_death_sound(&self)
fn play_death_sound(&self)
Source§fn get_age_scale(&self) -> f32
fn get_age_scale(&self) -> f32
Source§fn get_scale(&self) -> f32
fn get_scale(&self) -> f32
Source§fn get_armor_cover_percentage(&self) -> f32
fn get_armor_cover_percentage(&self) -> f32
Source§fn get_visibility_percent(&self, targeting_entity: Option<&dyn Entity>) -> f64
fn get_visibility_percent(&self, targeting_entity: Option<&dyn Entity>) -> f64
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
targeting_entity.Source§fn can_be_seen_by_anyone(&self) -> bool
fn can_be_seen_by_anyone(&self) -> bool
Source§fn can_be_seen_as_enemy(&self) -> bool
fn can_be_seen_as_enemy(&self) -> bool
Source§fn can_attack(&self, target: &dyn LivingEntity) -> bool
fn can_attack(&self, target: &dyn LivingEntity) -> bool
target: never a player on
peaceful difficulty, and only visible, non-invulnerable targets otherwise.Source§fn last_damage_source(&self) -> Option<RecentDamageSource>
fn last_damage_source(&self) -> Option<RecentDamageSource>
RecentDamageSource retention semantics.Source§fn record_last_damage_source(&self, source: &DamageSource)
fn record_last_damage_source(&self, source: &DamageSource)
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)
Source§fn invulnerable_time(&self) -> i32
fn invulnerable_time(&self) -> i32
Entity.invulnerableTime).Source§fn set_invulnerable_time(&self, invulnerable_time: i32)
fn set_invulnerable_time(&self, invulnerable_time: i32)
Source§fn set_last_hurt_by_player_memory_time(&self, time_to_remember: i32)
fn set_last_hurt_by_player_memory_time(&self, time_to_remember: i32)
Source§fn last_hurt_by_player_memory_time(&self) -> i32
fn last_hurt_by_player_memory_time(&self) -> i32
Source§fn last_hurt_by_player_uuid(&self) -> Option<Uuid>
fn last_hurt_by_player_uuid(&self) -> Option<Uuid>
LivingEntity.lastHurtByPlayer, if still remembered.Source§fn last_hurt_by_mob(&self) -> Option<SharedEntity>
fn last_hurt_by_mob(&self) -> Option<SharedEntity>
Source§fn last_hurt_by_mob_timestamp(&self) -> i32
fn last_hurt_by_mob_timestamp(&self) -> i32
Source§fn set_last_hurt_by_mob(&self, target: Option<&SharedEntity>)
fn set_last_hurt_by_mob(&self, target: Option<&SharedEntity>)
Source§fn last_hurt_mob(&self) -> Option<SharedEntity>
fn last_hurt_mob(&self) -> Option<SharedEntity>
Source§fn last_hurt_mob_timestamp(&self) -> i32
fn last_hurt_mob_timestamp(&self) -> i32
Source§fn set_last_hurt_mob(&self, target: Option<&SharedEntity>)
fn set_last_hurt_mob(&self, target: Option<&SharedEntity>)
Source§fn resolve_mob_responsible_for_damage(&self, source: &DamageSource)
fn resolve_mob_responsible_for_damage(&self, source: &DamageSource)
no_anger, or wind
charges when this mob is immune to their anger).Source§fn resolve_player_responsible_for_damage(&self, source: &DamageSource)
fn resolve_player_responsible_for_damage(&self, source: &DamageSource)
Source§fn has_line_of_sight(&self, target: &dyn Entity) -> bool
fn has_line_of_sight(&self, target: &dyn Entity) -> bool
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
Source§fn default_is_invulnerable_to(&self, source: &DamageSource) -> bool
fn default_is_invulnerable_to(&self, source: &DamageSource) -> bool
Source§fn is_invulnerable_to(&self, _world: &World, source: &DamageSource) -> bool
fn is_invulnerable_to(&self, _world: &World, source: &DamageSource) -> bool
Source§fn hurt_server(&self, world: &World, source: &DamageSource, amount: f32) -> bool
fn hurt_server(&self, world: &World, source: &DamageSource, amount: f32) -> bool
Source§fn default_hurt_server(
&self,
world: &World,
source: &DamageSource,
amount: f32,
) -> bool
fn default_hurt_server( &self, world: &World, source: &DamageSource, amount: f32, ) -> bool
LivingEntity.hurtServer body. Read moreSource§fn before_actually_hurt(&self, _source: &DamageSource, _amount: f32)
fn before_actually_hurt(&self, _source: &DamageSource, _amount: f32)
Source§fn hurt_armor(&self, _source: &DamageSource, _damage: f32)
fn hurt_armor(&self, _source: &DamageSource, _damage: f32)
Source§fn do_hurt_equipment(
&self,
source: &DamageSource,
damage: f32,
slots: &[EquipmentSlot],
)
fn do_hurt_equipment( &self, source: &DamageSource, damage: f32, slots: &[EquipmentSlot], )
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
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
Source§fn actually_hurt(&self, world: &World, source: &DamageSource, amount: f32)
fn actually_hurt(&self, world: &World, source: &DamageSource, amount: f32)
Source§fn apply_damage_knockback(&self, source: &DamageSource)
fn apply_damage_knockback(&self, source: &DamageSource)
Source§fn damage_knockback_direction(&self, source: &DamageSource) -> (f64, f64)
fn damage_knockback_direction(&self, source: &DamageSource) -> (f64, f64)
Source§fn knockback(&self, power: f64, xd: f64, zd: f64)
fn knockback(&self, power: f64, xd: f64, zd: f64)
xd, zd), scaled by
power and reduced by knockback resistance.Source§fn knockback_resistance(&self) -> f64
fn knockback_resistance(&self) -> f64
Source§fn indicate_damage(&self, _xd: f64, _zd: f64)
fn indicate_damage(&self, _xd: f64, _zd: f64)
Source§fn hurt_broadcast_chunk(&self) -> ChunkPos
fn hurt_broadcast_chunk(&self) -> ChunkPos
Source§fn broadcast_damage_event(&self, world: &World, source: &DamageSource)
fn broadcast_damage_event(&self, world: &World, source: &DamageSource)
Source§fn check_totem_death_protection(&self, source: &DamageSource) -> bool
fn check_totem_death_protection(&self, source: &DamageSource) -> bool
Source§fn die(&self, source: &DamageSource)
fn die(&self, source: &DamageSource)
Source§fn handle_killing_blow(&self)
fn handle_killing_blow(&self)
LivingEntity.handleKillingBlow. Read moreSource§fn should_drop_loot(&self, world: &World) -> bool
fn should_drop_loot(&self, world: &World) -> bool
LivingEntity.shouldDropLoot.
Returns whether this entity should drop loot on death: not a baby,
and the mob-drops game rule allows it.Source§fn should_drop_experience(&self) -> bool
fn should_drop_experience(&self) -> bool
Source§fn is_always_experience_dropper(&self) -> bool
fn is_always_experience_dropper(&self) -> bool
Source§fn skip_drop_experience(&self)
fn skip_drop_experience(&self)
Source§fn was_experience_consumed(&self) -> bool
fn was_experience_consumed(&self) -> bool
Source§fn experience_reward(
&self,
_world: &World,
_killer_entity: Option<&dyn Entity>,
) -> i32
fn experience_reward( &self, _world: &World, _killer_entity: Option<&dyn Entity>, ) -> i32
Source§fn drop_all_death_loot(&self, source: &DamageSource)
fn drop_all_death_loot(&self, source: &DamageSource)
LivingEntity.dropAllDeathLoot.Source§fn drop_experience(
&self,
world: &Arc<World>,
killer_entity: Option<&dyn Entity>,
)
fn drop_experience( &self, world: &Arc<World>, killer_entity: Option<&dyn Entity>, )
Source§fn death_loot_table(&self) -> Option<LootTableRef>
fn death_loot_table(&self) -> Option<LootTableRef>
Source§fn death_loot_table_seed(&self) -> i64
fn death_loot_table_seed(&self) -> i64
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)
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, )
Source§fn tick_death(&self)
fn tick_death(&self)
Source§fn get_absorption_amount(&self) -> f32
fn get_absorption_amount(&self) -> f32
Source§fn set_absorption_amount(&self, amount: f32)
fn set_absorption_amount(&self, amount: f32)
Source§fn fall_damage_sound(&self, damage: i32) -> SoundEventRef
fn fall_damage_sound(&self, damage: i32) -> SoundEventRef
damage.Source§fn play_block_fall_sound(&self)
fn play_block_fall_sound(&self)
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
Source§fn get_armor_value(&self) -> i32
fn get_armor_value(&self) -> i32
Source§fn get_attribute_gravity(&self) -> f64
fn get_attribute_gravity(&self) -> f64
Source§fn get_effective_gravity(&self) -> f64
fn get_effective_gravity(&self) -> f64
Source§fn is_affected_by_potions(&self) -> bool
fn is_affected_by_potions(&self) -> bool
Source§fn is_inverted_heal_and_harm(&self) -> bool
fn is_inverted_heal_and_harm(&self) -> bool
Source§fn default_can_be_affected(&self, effect: &MobEffectInstance) -> bool
fn default_can_be_affected(&self, effect: &MobEffectInstance) -> bool
LivingEntity.canBeAffected eligibility.Source§fn can_be_affected(&self, effect: &MobEffectInstance) -> bool
fn can_be_affected(&self, effect: &MobEffectInstance) -> bool
Source§fn has_mob_effect(&self, effect: MobEffectRef) -> bool
fn has_mob_effect(&self, effect: MobEffectRef) -> bool
effect active.Source§fn mob_effect(&self, effect: MobEffectRef) -> Option<ActiveMobEffect>
fn mob_effect(&self, effect: MobEffectRef) -> Option<ActiveMobEffect>
effect, if any.Source§fn active_mob_effects(&self) -> Vec<ActiveMobEffect> ⓘ
fn active_mob_effects(&self) -> Vec<ActiveMobEffect> ⓘ
Source§fn set_mob_effect(&self, effect: MobEffectRef, amplifier: i32)
fn set_mob_effect(&self, effect: MobEffectRef, amplifier: i32)
Source§fn add_mob_effect(&self, effect: MobEffectInstance) -> bool
fn add_mob_effect(&self, effect: MobEffectInstance) -> bool
Source§fn add_mob_effect_with_source(
&self,
effect: MobEffectInstance,
source: Option<&dyn Entity>,
) -> bool
fn add_mob_effect_with_source( &self, effect: MobEffectInstance, source: Option<&dyn Entity>, ) -> bool
source.Source§fn set_mob_effect_active(&self, effect: MobEffectRef, active: bool)
fn set_mob_effect_active(&self, effect: MobEffectRef, active: bool)
Source§fn remove_mob_effect(&self, effect: MobEffectRef) -> bool
fn remove_mob_effect(&self, effect: MobEffectRef) -> bool
Source§fn tick_mob_effects(&self)
fn tick_mob_effects(&self)
Source§fn has_water_breathing(&self) -> bool
fn has_water_breathing(&self) -> bool
Source§fn should_effects_refill_air_supply(&self) -> bool
fn should_effects_refill_air_supply(&self) -> bool
Source§fn can_breathe_underwater(&self) -> bool
fn can_breathe_underwater(&self) -> bool
Source§fn can_drown_in_water(&self) -> bool
fn can_drown_in_water(&self) -> bool
Source§fn is_eye_in_bubble_column(&self) -> bool
fn is_eye_in_bubble_column(&self) -> bool
Source§fn decrease_air_supply(&self, current_supply: i32) -> i32
fn decrease_air_supply(&self, current_supply: i32) -> i32
Source§fn increase_air_supply(&self, current_supply: i32) -> i32
fn increase_air_supply(&self, current_supply: i32) -> i32
Source§fn should_take_drowning_damage(&self) -> bool
fn should_take_drowning_damage(&self) -> bool
Source§fn tick_living_air_supply(&self)
fn tick_living_air_supply(&self)
baseTick.Source§fn is_in_wall(&self) -> bool
fn is_in_wall(&self) -> bool
Source§fn tick_in_wall_damage(&self)
fn tick_in_wall_damage(&self)
baseTick.Source§fn tick_living_environmental_damage(&self)
fn tick_living_environmental_damage(&self)
LivingEntity.baseTick order.Source§fn is_affected_by_fluids(&self) -> bool
fn is_affected_by_fluids(&self) -> bool
Source§fn can_stand_on_fluid(&self, _fluid_state: FluidState) -> bool
fn can_stand_on_fluid(&self, _fluid_state: FluidState) -> bool
Source§fn is_using_item(&self) -> bool
fn is_using_item(&self) -> bool
Source§fn is_blocking(&self) -> bool
fn is_blocking(&self) -> bool
Source§fn is_fall_flying(&self) -> bool
fn is_fall_flying(&self) -> bool
Source§fn set_fall_flying(&self, fall_flying: bool)
fn set_fall_flying(&self, fall_flying: bool)
Source§fn fall_flying_ticks(&self) -> i32
fn fall_flying_ticks(&self) -> i32
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), )
Source§fn is_holding(&self, predicate: &mut dyn FnMut(&ItemStack) -> bool) -> bool
fn is_holding(&self, predicate: &mut dyn FnMut(&ItemStack) -> bool) -> bool
predicate.Source§fn tick_equipment(&self)
fn tick_equipment(&self)
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), )
Source§fn has_item_in_slot(&self, slot: EquipmentSlot) -> bool
fn has_item_in_slot(&self, slot: EquipmentSlot) -> bool
slot.Source§fn can_use_slot(&self, _slot: EquipmentSlot) -> bool
fn can_use_slot(&self, _slot: EquipmentSlot) -> bool
slot.Source§fn can_dispenser_equip_into_slot(&self, _slot: EquipmentSlot) -> bool
fn can_dispenser_equip_into_slot(&self, _slot: EquipmentSlot) -> bool
Source§fn can_equip_with_dispenser(&self, item_stack: &ItemStack) -> bool
fn can_equip_with_dispenser(&self, item_stack: &ItemStack) -> bool
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
item_stack may be worn in slot, defaulting to
holdable-in-main-hand items with no equippable component.Source§fn equip_sound(
&self,
slot: EquipmentSlot,
stack: &ItemStack,
) -> Option<SoundEventRef>
fn equip_sound( &self, slot: EquipmentSlot, stack: &ItemStack, ) -> Option<SoundEventRef>
Source§fn on_equip_item(
&self,
slot: EquipmentSlot,
previous: &ItemStack,
stack: &ItemStack,
)
fn on_equip_item( &self, slot: EquipmentSlot, previous: &ItemStack, stack: &ItemStack, )
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
ItemStack.interactLivingEntity branch.Source§fn refresh_equipment_attribute_modifiers(&self, slot: EquipmentSlot)
fn refresh_equipment_attribute_modifiers(&self, slot: EquipmentSlot)
Source§fn detect_equipment_updates(&self)
fn detect_equipment_updates(&self)
Source§fn pack_living_equipment(&self) -> Vec<EquipmentSlotItem>
fn pack_living_equipment(&self) -> Vec<EquipmentSlotItem>
Source§fn drain_dirty_living_equipment(&self) -> Vec<EquipmentSlotItem>
fn drain_dirty_living_equipment(&self) -> Vec<EquipmentSlotItem>
Source§fn has_infinite_materials(&self) -> bool
fn has_infinite_materials(&self) -> bool
Source§fn handle_extra_items_created_on_use(&self, _extra: ItemStack)
fn handle_extra_items_created_on_use(&self, _extra: ItemStack)
LivingEntity.handleExtraItemsCreatedOnUse,
which is a no-op for non-player mobs.Source§fn on_equipped_item_broken(&self, _item: ItemRef, slot: EquipmentSlot)
fn on_equipped_item_broken(&self, _item: ItemRef, slot: EquipmentSlot)
Source§fn default_living_can_freeze(&self) -> bool
fn default_living_can_freeze(&self) -> bool
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
Source§fn remove_frost(&self)
fn remove_frost(&self)
Source§fn try_add_frost(&self)
fn try_add_frost(&self)
Source§fn tick_freezing(&self)
fn tick_freezing(&self)
ticks_frozen when not
in powder snow (or unable to freeze), then refreshes the powder-snow
speed penalty.Source§fn tick_living_entity(&self, entity: &SharedEntity)
fn tick_living_entity(&self, entity: &SharedEntity)
LivingEntity.tick. Read moreSource§fn tick_living_state(&self)
fn tick_living_state(&self)
Source§fn can_glide_using(&self, item_stack: &ItemStack, slot: EquipmentSlot) -> bool
fn can_glide_using(&self, item_stack: &ItemStack, slot: EquipmentSlot) -> bool
Source§fn can_glide_using_equipment_slot(&self, slot: EquipmentSlot) -> bool
fn can_glide_using_equipment_slot(&self, slot: EquipmentSlot) -> bool
slot can be used for vanilla gliding.Source§fn damage_random_glider(&self)
fn damage_random_glider(&self)
Source§fn default_can_glide(&self) -> bool
fn default_can_glide(&self) -> bool
Source§fn can_glide(&self) -> bool
fn can_glide(&self) -> bool
Source§fn start_fall_flying(&self)
fn start_fall_flying(&self)
Source§fn try_to_start_fall_flying(&self) -> bool
fn try_to_start_fall_flying(&self) -> bool
Source§fn last_climbable_pos(&self) -> Option<BlockPos>
fn last_climbable_pos(&self) -> Option<BlockPos>
Source§fn set_last_climbable_pos(&self, pos: BlockPos)
fn set_last_climbable_pos(&self, pos: BlockPos)
Source§fn default_living_on_climbable(&self) -> bool
fn default_living_on_climbable(&self) -> bool
Source§fn should_discard_friction(&self) -> bool
fn should_discard_friction(&self) -> bool
Source§fn set_discard_friction(&self, discard_friction: bool)
fn set_discard_friction(&self, discard_friction: bool)
Source§fn is_jumping(&self) -> bool
fn is_jumping(&self) -> bool
Source§fn set_jumping(&self, jumping: bool)
fn set_jumping(&self, jumping: bool)
Source§fn travel_input(&self) -> LivingTravelInput
fn travel_input(&self) -> LivingTravelInput
Source§fn set_travel_input(&self, input: LivingTravelInput)
fn set_travel_input(&self, input: LivingTravelInput)
Source§fn apply_input(&self)
fn apply_input(&self)
Source§fn no_jump_delay(&self) -> i32
fn no_jump_delay(&self) -> i32
Source§fn set_no_jump_delay(&self, ticks: i32)
fn set_no_jump_delay(&self, ticks: i32)
Source§fn tick_no_jump_delay(&self)
fn tick_no_jump_delay(&self)
Source§fn default_is_immobile(&self) -> bool
fn default_is_immobile(&self) -> bool
LivingEntity.isImmobile().
Returns whether this entity is immobile because it’s dead or dying.Source§fn is_immobile(&self) -> bool
fn is_immobile(&self) -> bool
Source§fn apply_living_velocity_thresholds(&self)
fn apply_living_velocity_thresholds(&self)
Source§fn get_jump_boost_power(&self) -> f32
fn get_jump_boost_power(&self) -> f32
Source§fn get_jump_power_with_multiplier(&self, multiplier: f32) -> f32
fn get_jump_power_with_multiplier(&self, multiplier: f32) -> f32
multiplier, the standing block’s jump factor, and Jump Boost.Source§fn get_jump_power(&self) -> f32
fn get_jump_power(&self) -> f32
Source§fn default_jump_from_ground(&self)
fn default_jump_from_ground(&self)
Source§fn jump_from_ground(&self)
fn jump_from_ground(&self)
Source§fn go_down_in_water(&self)
fn go_down_in_water(&self)
Source§fn jump_in_liquid(&self, _fluid_tag: &Identifier)
fn jump_in_liquid(&self, _fluid_tag: &Identifier)
Source§fn handle_living_jump(&self)
fn handle_living_jump(&self)
Source§fn tick_ridden(&self, _controller: &Player, _ridden_input: DVec3)
fn tick_ridden(&self, _controller: &Player, _ridden_input: DVec3)
Source§fn ridden_input(&self, _controller: &Player, self_input: DVec3) -> DVec3
fn ridden_input(&self, _controller: &Player, self_input: DVec3) -> DVec3
Source§fn ridden_speed(&self, _controller: &Player) -> f32
fn ridden_speed(&self, _controller: &Player) -> f32
Source§fn travel_ridden(
&self,
entity: &SharedEntity,
controller: &Player,
self_input: DVec3,
) -> Option<MoveResult>
fn travel_ridden( &self, entity: &SharedEntity, controller: &Player, self_input: DVec3, ) -> Option<MoveResult>
Source§fn default_ai_step(&self, entity: &SharedEntity) -> Option<MoveResult>
fn default_ai_step(&self, entity: &SharedEntity) -> Option<MoveResult>
LivingEntity.aiStep() movement foundation for overrides. Read moreSource§fn push_entities(&self)
fn push_entities(&self)
Source§fn push_entities_in_order(&self, entities: &[SharedEntity])
fn push_entities_in_order(&self, entities: &[SharedEntity])
entities in the given order. The caller applies cramming damage first.Source§fn apply_entity_cramming_damage(
&self,
world: &World,
pushable_entities: &[SharedEntity],
)
fn apply_entity_cramming_damage( &self, world: &World, pushable_entities: &[SharedEntity], )
LivingEntity.pushEntities().Source§fn is_suppressing_sliding_down_ladder(&self) -> bool
fn is_suppressing_sliding_down_ladder(&self) -> bool
Source§fn levitation_travel_y_delta(&self, movement_y: f64) -> Option<f64>
fn levitation_travel_y_delta(&self, movement_y: f64) -> Option<f64>
travelInAir.Source§fn should_travel_in_fluid(&self, fluid_state: FluidState) -> bool
fn should_travel_in_fluid(&self, fluid_state: FluidState) -> bool
Source§fn get_water_slow_down(&self) -> f32
fn get_water_slow_down(&self) -> f32
Source§fn water_movement_efficiency(&self) -> f32
fn water_movement_efficiency(&self) -> f32
Source§fn has_dolphins_grace(&self) -> bool
fn has_dolphins_grace(&self) -> bool
Source§fn get_flying_speed(&self) -> f32
fn get_flying_speed(&self) -> f32
Source§fn get_friction_influenced_speed(&self, block_friction: f32) -> f32
fn get_friction_influenced_speed(&self, block_friction: f32) -> f32
Source§fn air_travel_vertical_friction(&self, _horizontal_friction: f32) -> f32
fn air_travel_vertical_friction(&self, _horizontal_friction: f32) -> f32
travelInAir.Source§fn handle_on_climbable(&self, movement: DVec3) -> DVec3
fn handle_on_climbable(&self, movement: DVec3) -> DVec3
Source§fn apply_living_travel_gravity(&self)
fn apply_living_travel_gravity(&self)
Source§fn handle_relative_friction_and_calculate_movement(
&self,
entity: &SharedEntity,
input: DVec3,
block_friction: f32,
) -> Option<(DVec3, MoveResult)>
fn handle_relative_friction_and_calculate_movement( &self, entity: &SharedEntity, input: DVec3, block_friction: f32, ) -> Option<(DVec3, MoveResult)>
Source§fn travel_in_air(
&self,
entity: &SharedEntity,
input: DVec3,
) -> Option<MoveResult>
fn travel_in_air( &self, entity: &SharedEntity, input: DVec3, ) -> Option<MoveResult>
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
Source§fn jump_out_of_fluid(&self, old_y: f64)
fn jump_out_of_fluid(&self, old_y: f64)
Source§fn float_in_water_while_ridden(&self)
fn float_in_water_while_ridden(&self)
Source§fn travel_in_water(
&self,
entity: &SharedEntity,
input: DVec3,
base_gravity: f64,
is_falling: bool,
old_y: f64,
) -> Option<MoveResult>
fn travel_in_water( &self, entity: &SharedEntity, input: DVec3, base_gravity: f64, is_falling: bool, old_y: f64, ) -> Option<MoveResult>
Source§fn travel_in_lava(
&self,
entity: &SharedEntity,
input: DVec3,
base_gravity: f64,
is_falling: bool,
old_y: f64,
) -> Option<MoveResult>
fn travel_in_lava( &self, entity: &SharedEntity, input: DVec3, base_gravity: f64, is_falling: bool, old_y: f64, ) -> Option<MoveResult>
Source§fn travel_in_fluid(
&self,
entity: &SharedEntity,
input: DVec3,
) -> Option<MoveResult>
fn travel_in_fluid( &self, entity: &SharedEntity, input: DVec3, ) -> Option<MoveResult>
Source§fn update_fall_flying(&self)
fn update_fall_flying(&self)
LivingEntity.updateFallFlying().Source§fn update_fall_flying_movement(&self, movement: DVec3) -> DVec3
fn update_fall_flying_movement(&self, movement: DVec3) -> DVec3
Source§fn stop_fall_flying(&self)
fn stop_fall_flying(&self)
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, )
Source§fn travel_fall_flying(
&self,
entity: &SharedEntity,
input: DVec3,
) -> Option<MoveResult>
fn travel_fall_flying( &self, entity: &SharedEntity, input: DVec3, ) -> Option<MoveResult>
Source§fn default_travel(
&self,
entity: &SharedEntity,
input: DVec3,
) -> Option<MoveResult>
fn default_travel( &self, entity: &SharedEntity, input: DVec3, ) -> Option<MoveResult>
Source§fn travel(&self, entity: &SharedEntity, input: DVec3) -> Option<MoveResult>
fn travel(&self, entity: &SharedEntity, input: DVec3) -> Option<MoveResult>
Source§fn sleeping_pos(&self) -> Option<BlockPos>
fn sleeping_pos(&self) -> Option<BlockPos>
Source§fn set_sleeping_pos(&self, bed_position: BlockPos)
fn set_sleeping_pos(&self, bed_position: BlockPos)
Source§fn clear_sleeping_pos(&self)
fn clear_sleeping_pos(&self)
Source§fn is_sleeping(&self) -> bool
fn is_sleeping(&self) -> bool
Source§fn living_synced_data(&self) -> Option<&dyn LivingEntitySyncedData>
fn living_synced_data(&self) -> Option<&dyn LivingEntitySyncedData>
None by default.Source§fn start_sleeping(&self, bed_position: BlockPos) -> Result<(), EntityMoveError>
fn start_sleeping(&self, bed_position: BlockPos) -> Result<(), EntityMoveError>
Source§fn default_stop_sleeping(&self)
fn default_stop_sleeping(&self)
super.stopSleeping().Source§fn stop_sleeping(&self)
fn stop_sleeping(&self)
Source§fn is_sprinting(&self) -> bool
fn is_sprinting(&self) -> bool
Source§fn set_sprinting(&self, sprinting: bool)
fn set_sprinting(&self, sprinting: bool)
Source§fn apply_post_impulse_grace_time(&self, ticks: i32)
fn apply_post_impulse_grace_time(&self, ticks: i32)
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, )
Source§fn is_ignoring_fall_damage_from_current_impulse(&self) -> bool
fn is_ignoring_fall_damage_from_current_impulse(&self) -> bool
Source§fn current_impulse_impact_pos(&self) -> Option<DVec3>
fn current_impulse_impact_pos(&self) -> Option<DVec3>
Source§fn try_reset_current_impulse_context(&self)
fn try_reset_current_impulse_context(&self)
Source§fn reset_current_impulse_context(&self)
fn reset_current_impulse_context(&self)
Source§fn is_in_post_impulse_grace_time(&self) -> bool
fn is_in_post_impulse_grace_time(&self) -> bool
Source§fn tick_post_impulse_grace_time(&self)
fn tick_post_impulse_grace_time(&self)
Source§fn refresh_dirty_attributes(&self)
fn refresh_dirty_attributes(&self)
Source§impl Mob for ChickenEntity
impl Mob for ChickenEntity
fn mob_base(&self) -> &MobBase
fn tick_goal_selectors(&self, entity: &SharedEntity)
fn custom_server_ai_step(&self)
fn ambient_sound(&self) -> Option<SoundEventRef>
fn remove_when_far_away(&self, _dist_sqr: f64) -> bool
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
fn mob_flags(&self) -> i8
fn set_mob_flags(&self, flags: i8)
Source§fn check_spawn_rules(
&self,
_world: &Arc<World>,
_reason: EntitySpawnReason,
) -> bool
fn check_spawn_rules( &self, _world: &Arc<World>, _reason: EntitySpawnReason, ) -> bool
Source§fn set_baby(&self, baby: bool)
fn set_baby(&self, baby: bool)
Mob.setBaby is a no-op; ageable
mobs derive it from their start age, and other mobs override as needed.Source§fn is_saddled(&self) -> bool
fn is_saddled(&self) -> bool
Source§fn has_line_of_sight_cached(&self, target: &dyn Entity) -> bool
fn has_line_of_sight_cached(&self, target: &dyn Entity) -> bool
fn xp_reward(&self) -> i32
fn set_xp_reward(&self, xp_reward: i32)
Source§fn target(&self) -> Option<SharedEntity>
fn target(&self) -> Option<SharedEntity>
Source§fn set_target(&self, target: Option<&SharedEntity>) -> bool
fn set_target(&self, target: Option<&SharedEntity>) -> bool
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
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)
Source§fn mob_base_tick(&self)
fn mob_base_tick(&self)
Mob.baseTick.fn finalize_spawn_mob_base( &self, _world: &Arc<World>, _spawn_reason: EntitySpawnReason, group_data: Option<SpawnGroupData>, ) -> Option<SpawnGroupData>
Source§fn convert_to(
&self,
entity_type: EntityTypeRef,
params: ConversionParams,
after_conversion: Option<&AfterConversion<'_>>,
) -> Option<SharedEntity>where
Self: Sized,
fn convert_to(
&self,
entity_type: EntityTypeRef,
params: ConversionParams,
after_conversion: Option<&AfterConversion<'_>>,
) -> Option<SharedEntity>where
Self: Sized,
params.
The callback finalizes mob-specific state. Returns None without changing
the source if it is removed or world, difficulty, factory, mob-type, or
insertion checks fail.Source§fn check_mob_spawn_rules(
entity_type: EntityTypeRef,
level: &dyn LevelReader,
spawn_reason: EntitySpawnReason,
pos: BlockPos,
) -> boolwhere
Self: Sized,
fn check_mob_spawn_rules(
entity_type: EntityTypeRef,
level: &dyn LevelReader,
spawn_reason: EntitySpawnReason,
pos: BlockPos,
) -> boolwhere
Self: Sized,
BlockBehavior::is_valid_spawn,
unless a spawner bypasses the surface check.fn check_spawn_obstruction(&self, world: &Arc<World>) -> bool
Source§fn interact_mob(
&self,
player: &Player,
hand: InteractionHand,
location: DVec3,
) -> InteractionResult
fn interact_mob( &self, player: &Player, hand: InteractionHand, location: DVec3, ) -> InteractionResult
Source§fn check_and_handle_important_interactions(
&self,
player: &Player,
hand: InteractionHand,
) -> InteractionResult
fn check_and_handle_important_interactions( &self, player: &Player, hand: InteractionHand, ) -> InteractionResult
Source§fn can_shear_equipment(&self, _player: &Player) -> bool
fn can_shear_equipment(&self, _player: &Player) -> bool
Source§fn use_player_item(&self, player: &Player, hand: InteractionHand)
fn use_player_item(&self, player: &Player, hand: InteractionHand)
fn requires_custom_persistence(&self) -> bool
fn is_persistence_required(&self) -> bool
fn set_persistence_required(&self)
Source§fn mob_can_be_leashed(&self) -> bool
fn mob_can_be_leashed(&self) -> bool
Source§fn can_pick_up_loot(&self) -> bool
fn can_pick_up_loot(&self) -> bool
fn set_can_pick_up_loot(&self, can_pick_up_loot: bool)
fn equipment_drop_chance(&self, slot: EquipmentSlot) -> f32
fn set_equipment_drop_chance(&self, slot: EquipmentSlot, chance: f32)
fn is_equipment_drop_preserved(&self, slot: EquipmentSlot) -> bool
fn set_guaranteed_drop(&self, slot: EquipmentSlot)
Source§fn get_pickup_reach(&self) -> DVec3
fn get_pickup_reach(&self) -> DVec3
Mob.getPickupReach: the per-axis distance the item-pickup search
box is inflated by. Overridable so mobs with a longer reach can widen it.Source§fn wants_to_pick_up(&self, item_stack: &ItemStack) -> bool
fn wants_to_pick_up(&self, item_stack: &ItemStack) -> bool
Mob.wantsToPickUp: whether this mob wants to collect the item it
just walked over. Defaults to whatever the mob is willing to hold.Source§fn can_hold_item(&self, _item_stack: &ItemStack) -> bool
fn can_hold_item(&self, _item_stack: &ItemStack) -> bool
Mob.canHoldItem: whether this mob is willing to hold the item.
The base mob holds anything; specific mobs narrow this down.Source§fn pick_up_item(&self, world: &Arc<World>, item_entity: &ItemEntity)
fn pick_up_item(&self, world: &Arc<World>, item_entity: &ItemEntity)
Mob.pickUpItem: take a dropped item into this mob’s equipment. Read moreSource§fn equip_item_if_possible(&self, item_stack: ItemStack) -> ItemStack
fn equip_item_if_possible(&self, item_stack: ItemStack) -> ItemStack
Mob.equipItemIfPossible: route item_stack to the slot its
equippable component asks for (main hand otherwise), swap up when the
target slot already holds worse gear, and drop the replaced piece by its
drop chance. Returns the stack that was equipped, or empty when nothing
was taken.Source§fn get_equipment_slot_for_item(&self, item_stack: &ItemStack) -> EquipmentSlot
fn get_equipment_slot_for_item(&self, item_stack: &ItemStack) -> EquipmentSlot
LivingEntity.getEquipmentSlotForItem: the slot an item wants to
occupy, falling back to the main hand when it is not equippable or the mob
cannot use that slot.Source§fn equipment_in_slot(&self, slot: EquipmentSlot) -> ItemStack
fn equipment_in_slot(&self, slot: EquipmentSlot) -> ItemStack
slot.Source§fn can_replace_current_item(
&self,
new_item_stack: &ItemStack,
current_item_stack: &ItemStack,
slot: EquipmentSlot,
) -> bool
fn can_replace_current_item( &self, new_item_stack: &ItemStack, current_item_stack: &ItemStack, slot: EquipmentSlot, ) -> bool
Mob.canReplaceCurrentItem: whether the freshly picked-up item
should displace what is already in slot.Source§fn compare_armor(
&self,
new_item_stack: &ItemStack,
current_item_stack: &ItemStack,
slot: EquipmentSlot,
) -> bool
fn compare_armor( &self, new_item_stack: &ItemStack, current_item_stack: &ItemStack, slot: EquipmentSlot, ) -> bool
Mob.compareArmor: prefer the piece granting more armor, then
more toughness, then the equal-item tiebreak, unless the worn piece is
protected against removal.Source§fn get_preferred_weapon_type(&self) -> Option<Identifier>
fn get_preferred_weapon_type(&self) -> Option<Identifier>
Mob.getPreferredWeaponType: the item tag a mob favors for its
main hand regardless of raw damage (a skeleton keeps its bow over a
stronger sword). The base mob has no preference; specific mobs override it.Source§fn compare_weapons(
&self,
new_item_stack: &ItemStack,
current_item_stack: &ItemStack,
slot: EquipmentSlot,
) -> bool
fn compare_weapons( &self, new_item_stack: &ItemStack, current_item_stack: &ItemStack, slot: EquipmentSlot, ) -> bool
Mob.compareWeapons: keep a piece of the mob’s preferred weapon
type over one that is not, otherwise prefer more attack damage, then the
equal-item tiebreak.Source§fn approximate_attribute_with(
&self,
item_stack: &ItemStack,
attribute: AttributeRef,
slot: EquipmentSlot,
) -> f64
fn approximate_attribute_with( &self, item_stack: &ItemStack, attribute: AttributeRef, slot: EquipmentSlot, ) -> f64
Mob.getApproximateAttributeWith: the value of attribute this
mob would have in slot while wearing item_stack, taking the mob’s base
value (zero when it lacks the attribute) and folding in the item’s
attribute modifiers.Source§fn can_replace_equal_item(
&self,
new_item_stack: &ItemStack,
current_item_stack: &ItemStack,
) -> bool
fn can_replace_equal_item( &self, new_item_stack: &ItemStack, current_item_stack: &ItemStack, ) -> bool
Mob.canReplaceEqualItem: the tiebreak when two pieces grade out
equally, favoring more enchantments, then less damage, then a custom name.Source§fn tick_looting(&self)
fn tick_looting(&self)
Mob.aiStep looting loop: while this mob may pick up loot and the
mobGriefing game rule allows it, collect nearby dropped items in reach.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_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
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
Source§fn max_head_y_rot(&self) -> f32
fn max_head_y_rot(&self) -> f32
Source§fn do_hurt_target(
&self,
entity: &SharedEntity,
world: &World,
target: &SharedEntity,
) -> bool
fn do_hurt_target( &self, entity: &SharedEntity, world: &World, target: &SharedEntity, ) -> bool
target: computes weapon
damage and knockback, applies enchantment effects, and returns whether
the target was hurt.Source§fn mob_attack_damage_source(
&self,
weapon_item: &ItemStack,
attacker: &SharedEntity,
) -> DamageSource
fn mob_attack_damage_source( &self, weapon_item: &ItemStack, attacker: &SharedEntity, ) -> DamageSource
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
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, )
Source§fn play_attack_sound(&self)
fn play_attack_sound(&self)
Source§fn is_within_melee_attack_range(&self, target: &dyn LivingEntity) -> bool
fn is_within_melee_attack_range(&self, target: &dyn LivingEntity) -> bool
target is within this mob’s melee attack range.Source§fn attack_bounding_box(&self, horizontal_expansion: f64) -> WorldAabb
fn attack_bounding_box(&self, horizontal_expansion: f64) -> WorldAabb
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)
Mob.setSpeed: update cached speed and forward AI input.fn mob_server_ai_step(&self, entity: &SharedEntity)
Source§fn is_sun_burn_tick(&self) -> bool
fn is_sun_burn_tick(&self) -> bool
MONSTERS_BURN is enabled.
Water, rain, and powder snow prevent burning.fn sun_protection_slot(&self) -> EquipmentSlot
Source§fn tick_daylight_burning(&self)
fn tick_daylight_burning(&self)
Source§fn mob_ai_step(&self, entity: &SharedEntity) -> Option<MoveResult>
fn mob_ai_step(&self, entity: &SharedEntity) -> Option<MoveResult>
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 ChickenEntity
impl PathfinderMob for ChickenEntity
fn controlled_pathfinder_vehicle(&self) -> Option<SharedEntity>
Source§fn get_walk_target_value(&self, pos: BlockPos) -> f32
fn get_walk_target_value(&self, pos: BlockPos) -> f32
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, entity: &SharedEntity)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 should_stay_close_to_leash_holder(&self) -> bool
fn follow_leash_speed(&self) -> f64
fn when_leashed_to_pathfinder(&self, holder: &dyn Entity)
Source§fn close_range_leash_behaviour_pathfinder(&self, holder: &dyn Entity)
fn close_range_leash_behaviour_pathfinder(&self, holder: &dyn Entity)
Source§fn remove_all_goals(&self, predicate: impl FnMut(&dyn Goal) -> bool)where
Self: Sized,
fn remove_all_goals(&self, predicate: impl FnMut(&dyn Goal) -> bool)where
Self: Sized,
PathfinderMob rather than
vanilla’s Mob because Steel’s goal hooks require pathfinding mobs.fn remove_free_will(&self)where
Self: Sized,
fn create_path_to_targets( &self, world: &Arc<World>, targets: &[BlockPos], reach_range: i32, ) -> Option<Path>
Auto Trait Implementations§
impl !Freeze for ChickenEntity
impl !RefUnwindSafe for ChickenEntity
impl !UnwindSafe for ChickenEntity
impl Send for ChickenEntity
impl Sync for ChickenEntity
impl Unpin for ChickenEntity
impl UnsafeUnpin for ChickenEntity
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
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,
T.Source§fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastType,
fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastType,
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,
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)
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> ⓘ
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> ⓘ
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 moreArc<SyncMutex<>>Source§impl<T> Leashable for Twhere
T: Mob,
impl<T> Leashable for Twhere
T: Mob,
Source§fn can_be_leashed(&self) -> bool
fn can_be_leashed(&self) -> bool
Rejects enemies by default; concrete mobs may override the type-level rule.
Source§fn leash_too_far_behaviour(&self)
fn leash_too_far_behaviour(&self)
Drops the leash and disables MOVE until re-leashed at close range.
Source§fn leash_data(&self) -> &Mutex<RawMutex, Option<LeashData>>
fn leash_data(&self) -> &Mutex<RawMutex, Option<LeashData>>
Source§fn on_leash_removed(&self)
fn on_leash_removed(&self)
Source§fn when_leashed_to(&self, holder: &(dyn Entity + 'static))
fn when_leashed_to(&self, holder: &(dyn Entity + 'static))
holder.Source§fn close_range_leash_behaviour(&self, holder: &(dyn Entity + 'static))
fn close_range_leash_behaviour(&self, holder: &(dyn Entity + 'static))
Source§fn is_leashed(&self) -> bool
fn is_leashed(&self) -> bool
Source§fn may_be_leashed(&self) -> bool
fn may_be_leashed(&self) -> bool
mayBeLeashed; permission is Self::can_be_leashed.Source§fn leash_holder(&self) -> Option<SharedEntity>
fn leash_holder(&self) -> Option<SharedEntity>
fn leash_attachment(&self) -> Option<LeashAttachment>
fn set_delayed_leash_attachment(&self, attachment: LeashAttachment)
Source§fn leash_distance_to(&self, holder: &dyn Entity) -> f64
fn leash_distance_to(&self, holder: &dyn Entity) -> f64
holder. Read moreSource§fn leash_snap_distance(&self) -> f64
fn leash_snap_distance(&self) -> f64
Source§fn leash_elastic_distance(&self) -> f64
fn leash_elastic_distance(&self) -> f64
Source§fn on_elastic_leash_pull(&self)
fn on_elastic_leash_pull(&self)
Source§fn check_elastic_interactions(&self, holder: &dyn Entity) -> bool
fn check_elastic_interactions(&self, holder: &dyn Entity) -> bool
Source§fn apply_leash_angular_momentum(&self) -> bool
fn apply_leash_angular_momentum(&self) -> bool
Source§fn rotate_by_leash_angular_momentum(&self, angular_momentum: f64)
fn rotate_by_leash_angular_momentum(&self, angular_momentum: f64)
Source§fn leash_angular_momentum(&self) -> Option<f64>
fn leash_angular_momentum(&self) -> Option<f64>
Source§fn leash_angular_friction(&self) -> f64
fn leash_angular_friction(&self) -> f64
Source§fn can_have_a_leash_attached_to(&self, holder: &dyn Entity) -> bool
fn can_have_a_leash_attached_to(&self, holder: &dyn Entity) -> bool
Source§fn set_leashed_to(&self, holder: &SharedEntity) -> bool
fn set_leashed_to(&self, holder: &SharedEntity) -> bool
Source§fn restore_leash_from_save(&self)
fn restore_leash_from_save(&self)
Source§fn tick_leash(&self)
fn tick_leash(&self)
Source§fn drop_leash(&self)
fn drop_leash(&self)
Source§fn remove_leash(&self)
fn remove_leash(&self)
Source§fn remove_leash_state(&self) -> Option<SharedEntity>
fn remove_leash_state(&self) -> Option<SharedEntity>
Self::on_leash_removed, preserving home state on failed save restoration.