pub struct EnderPearlEntity {
base: EntityBase,
entity_type: EntityTypeRef,
entity_data: SyncMutex<EnderPearlEntityData>,
projectile_base: ProjectileBase,
ticket_timer: SyncMutex<i32>,
}Expand description
A thrown ender pearl.
Fields§
§base: EntityBaseCommon entity fields (id, uuid, position, etc.).
entity_type: EntityTypeRefVanilla entity type registered for this implementation.
entity_data: SyncMutex<EnderPearlEntityData>Synced data carrying the rendered item stack.
projectile_base: ProjectileBaseShared Projectile state (owner / left-owner / has-been-shot).
ticket_timer: SyncMutex<i32>Countdown until the chunk-loading ticket is refreshed (vanilla ticketTimer).
Implementations§
Source§impl EnderPearlEntity
impl EnderPearlEntity
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 ender pearl with no owner and the default rendered item.
Sourcepub fn from_saved(entity_type: EntityTypeRef, load: EntityBaseLoad) -> Self
pub fn from_saved(entity_type: EntityTypeRef, load: EntityBaseLoad) -> Self
Creates an ender pearl from saved base data.
Sourcefn owner_player(&self) -> Option<SharedEntity>
fn owner_player(&self) -> Option<SharedEntity>
Resolves the owner as an online player, including cached cross-world refs.
Sourcefn deregister_from_owner(&self)
fn deregister_from_owner(&self)
Removes this pearl from its owner’s persistence set when it hits or is
discarded (vanilla ThrownEnderpearl.onRemoval deregistration).
Sourcefn update_ender_pearl_ticket(&self, world: &Arc<World>)
fn update_ender_pearl_ticket(&self, world: &Arc<World>)
Refreshes the chunk-loading ticket so the pearl keeps flying across the
simulation border (vanilla ThrownEnderpearl.tick →
registerAndUpdateEnderPearlTicket).
Re-places the ticket when the countdown lapses or the pearl crosses a chunk border, but only while owned by an online player.
Sourcefn should_vanish_on_owner_death(&self, world: &Arc<World>) -> bool
fn should_vanish_on_owner_death(&self, world: &Arc<World>) -> bool
Vanilla ThrownEnderpearl.tick owner-death short-circuit: a pearl whose
owner is a dead player vanishes when the gamerule is set.
const fn should_vanish_for_owner_state( owner_alive: bool, owner_won_game: bool, vanish_on_death_rule: bool, ) -> bool
Sourcefn is_allowed_to_teleport_owner(world: &Arc<World>, player: &Player) -> bool
fn is_allowed_to_teleport_owner(world: &Arc<World>, player: &Player) -> bool
Vanilla ThrownEnderpearl.isAllowedToTeleportOwner.
Sourcefn teleport_owner(
&self,
world: &Arc<World>,
owner: &SharedEntity,
player: &Player,
teleport_pos: DVec3,
)
fn teleport_owner( &self, world: &Arc<World>, owner: &SharedEntity, player: &Player, teleport_pos: DVec3, )
Teleports the owning player and applies the pearl’s effects.
Mirrors the ServerPlayer branch of vanilla ThrownEnderpearl.onHit.
Trait Implementations§
Source§impl DowncastType for EnderPearlEntity
impl DowncastType for EnderPearlEntity
Source§const TYPE_KEY: DowncastTypeKey
const TYPE_KEY: DowncastTypeKey
Source§impl Entity for EnderPearlEntity
impl Entity for EnderPearlEntity
Source§fn base(&self) -> &EntityBase
fn base(&self) -> &EntityBase
Source§fn entity_type(&self) -> EntityTypeRef
fn entity_type(&self) -> EntityTypeRef
Source§fn get_default_gravity(&self) -> f64
fn get_default_gravity(&self) -> f64
Source§fn sound_source(&self) -> SoundSource
fn sound_source(&self) -> SoundSource
Source§fn spawn_data(&self) -> i32
fn spawn_data(&self) -> i32
Source§fn restore_owner_reference(&self, owner: &SharedEntity)
fn restore_owner_reference(&self, owner: &SharedEntity)
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 attackable(&self) -> bool
fn attackable(&self) -> bool
Source§fn synced_data(&self) -> Option<&dyn EntitySyncedData>
fn synced_data(&self) -> Option<&dyn EntitySyncedData>
Source§fn hurt(&self, _world: &World, _source: &DamageSource, _amount: f32) -> bool
fn hurt(&self, _world: &World, _source: &DamageSource, _amount: f32) -> bool
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 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
Entity.getInBlockState.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
Entity.isFree() for the current bounding box shifted by delta.Source§fn blocks_building(&self) -> bool
fn blocks_building(&self) -> bool
Source§fn is_pickable(&self) -> bool
fn is_pickable(&self) -> bool
Source§fn skip_attack_interaction(&self, _source: &dyn Entity) -> bool
fn skip_attack_interaction(&self, _source: &dyn Entity) -> 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)
Entity.onAboveBubbleColumn.Source§fn on_inside_bubble_column(&self, drag_down: bool)
fn on_inside_bubble_column(&self, drag_down: bool)
Entity.onInsideBubbleColumn.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 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
Entity.isInvisible().Source§fn is_discrete(&self) -> bool
fn is_discrete(&self) -> bool
Entity.isDiscrete().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 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. Read moreSource§fn stop_riding(&self)
fn stop_riding(&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. Read moreSource§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
Entity.dismountsUnderwater.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. Read moreSource§fn can_add_passenger(&self, _passenger: &dyn Entity) -> bool
fn can_add_passenger(&self, _passenger: &dyn Entity) -> bool
passenger as a direct passenger. Read moreSource§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 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. Read moreSource§fn position_rider(&self, passenger: &dyn Entity)
fn position_rider(&self, passenger: &dyn Entity)
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. Read moreSource§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. Read moreSource§fn can_collide_with(&self, other: &dyn Entity) -> bool
fn can_collide_with(&self, other: &dyn Entity) -> bool
other. Read moreSource§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
Entity.getRelativePortalPosition.Source§fn default_tick(&self)
fn default_tick(&self)
Entity.tick() behavior. Read moreSource§fn ride_tick(&self)
fn ride_tick(&self)
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 update_data_before_sync(&self)
fn update_data_before_sync(&self)
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(&self, event: GameEventRef)
fn game_event(&self, event: GameEventRef)
Source§fn kill(&self, world: &World)
fn kill(&self, world: &World)
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
Entity.attemptToShearEquipment.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
Entity.interact behavior.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_mob(&self) -> Option<&dyn Mob>
fn as_mob(&self) -> Option<&dyn Mob>
Source§fn as_animal(&self) -> Option<&dyn Animal>
fn as_animal(&self) -> Option<&dyn Animal>
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
ServerEntity should force velocity sync for fall flying.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 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
Entity.tickCount.Source§fn advance_tick_count(&self)
fn advance_tick_count(&self)
Entity.tickCount.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 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 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
Entity.getFluidJumpThreshold().Source§fn is_in_wall(&self) -> bool
fn is_in_wall(&self) -> bool
Entity.isInWall.Source§fn calculate_view_vector(&self, pitch_degrees: f32, yaw_degrees: f32) -> DVec3
fn calculate_view_vector(&self, pitch_degrees: f32, yaw_degrees: f32) -> DVec3
Entity.calculateViewVector().Source§fn look_angle(&self) -> DVec3
fn look_angle(&self) -> DVec3
Entity.getLookAngle().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
ServerEntity should consider sending velocity.Source§fn mark_velocity_sync(&self)
fn mark_velocity_sync(&self)
ServerEntity synchronization.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)
Entity.checkFallDistanceAccumulation().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
remainingFireTicks.Source§fn set_remaining_fire_ticks(&self, remaining_fire_ticks: i32)
fn set_remaining_fire_ticks(&self, remaining_fire_ticks: i32)
remainingFireTicks.Source§fn ticks_frozen(&self) -> i32
fn ticks_frozen(&self) -> i32
TicksFrozen.Source§fn set_ticks_frozen(&self, ticks_frozen: i32)
fn set_ticks_frozen(&self, ticks_frozen: i32)
TicksFrozen.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 remaining_fire_ticks_cap(&self) -> Option<i32>
fn remaining_fire_ticks_cap(&self) -> Option<i32>
remainingFireTicks this entity can store.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
hasVisualFire.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
getTicksRequiredToFreeze.Source§fn is_fully_frozen(&self) -> bool
fn is_fully_frozen(&self) -> bool
Source§fn percent_frozen(&self) -> f32
fn percent_frozen(&self) -> f32
Entity.getPercentFrozen.Source§fn clear_freeze(&self)
fn clear_freeze(&self)
Source§fn clear_fire(&self)
fn clear_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_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 refresh_fluid_contact_for_base_tick(&self) -> EntityFluidContact
fn refresh_fluid_contact_for_base_tick(&self) -> EntityFluidContact
Source§fn scan_and_store_fluid_contact(
&self,
advance_eye_water_history: bool,
) -> EntityFluidContact
fn scan_and_store_fluid_contact( &self, advance_eye_water_history: bool, ) -> EntityFluidContact
Source§fn apply_fluid_current_for_base_tick(
&self,
world: &Arc<World>,
contact: EntityFluidContact,
)
fn apply_fluid_current_for_base_tick( &self, world: &Arc<World>, contact: EntityFluidContact, )
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,
fall_distance: f64,
damage_modifier: f32,
source: &DamageSource,
) -> bool
fn cause_fall_damage( &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 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,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn default_apply_accepted_client_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Source§fn apply_accepted_client_movement(
&self,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn apply_accepted_client_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Source§fn apply_accepted_client_vehicle_movement(
&self,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn apply_accepted_client_vehicle_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Source§fn try_set_position(&self, pos: DVec3) -> Result<(), EntityMoveError>
fn try_set_position(&self, pos: DVec3) -> Result<(), EntityMoveError>
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 block_speed_factor(&self) -> f32
fn block_speed_factor(&self) -> f32
Source§fn block_jump_factor(&self) -> f32
fn block_jump_factor(&self) -> f32
Entity.getBlockJumpFactor().Source§fn dimensions_for_pose(&self, _pose: EntityPose) -> EntityDimensions
fn dimensions_for_pose(&self, _pose: EntityPose) -> EntityDimensions
Source§fn refresh_dimensions(&self)
fn refresh_dimensions(&self)
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
Air value.Source§fn set_air_supply(&self, air_supply: i32)
fn set_air_supply(&self, air_supply: i32)
Air value.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 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 play_entity_on_fire_extinguished_sound(&self)
fn play_entity_on_fire_extinguished_sound(&self)
Source§fn play_step_sound(&self, _pos: BlockPos, block_state: BlockStateId)
fn play_step_sound(&self, _pos: BlockPos, block_state: BlockStateId)
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 is_flapping(&self) -> bool
fn is_flapping(&self) -> bool
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 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)
NoGravity flag.Source§fn is_invulnerable(&self) -> bool
fn is_invulnerable(&self) -> bool
Invulnerable flag.Source§fn set_invulnerable(&self, invulnerable: bool)
fn set_invulnerable(&self, invulnerable: bool)
Invulnerable flag.Source§fn get_gravity(&self) -> f64
fn get_gravity(&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)
Entity.moveRelative().Source§fn move_without_physics(&self, delta: DVec3) -> Option<MoveResult>
fn move_without_physics(&self, delta: DVec3) -> Option<MoveResult>
Source§fn move_entity(&self, mover_type: MoverType, delta: DVec3) -> Option<MoveResult>
fn move_entity(&self, mover_type: MoverType, delta: DVec3) -> Option<MoveResult>
Source§fn apply_fall_damage_after_move(
&self,
result: &MoveResult,
world: &Arc<World>,
) -> bool
fn apply_fall_damage_after_move( &self, result: &MoveResult, world: &Arc<World>, ) -> bool
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,
movement: DVec3,
on_ground: bool,
world: &Arc<World>,
) -> bool
fn do_check_fall_damage( &self, movement: DVec3, on_ground: bool, world: &Arc<World>, ) -> bool
Entity.doCheckFallDamage. Read moreSource§fn refresh_supporting_block_for_fall_damage(
&self,
movement: DVec3,
on_ground: bool,
)
fn refresh_supporting_block_for_fall_damage( &self, movement: DVec3, on_ground: bool, )
Source§fn check_fall_damage(
&self,
vertical_movement: f64,
on_ground: bool,
on_state: BlockStateId,
pos: BlockPos,
world: &Arc<World>,
)
fn check_fall_damage( &self, vertical_movement: f64, on_ground: bool, on_state: BlockStateId, pos: BlockPos, world: &Arc<World>, )
Entity.checkFallDamage.Source§fn ground_contact_after_movement(
&self,
on_ground: bool,
movement: Option<DVec3>,
) -> EntityGroundContact
fn ground_contact_after_movement( &self, on_ground: bool, movement: Option<DVec3>, ) -> EntityGroundContact
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
Entity.checkSupportingBlock.Source§fn spawn_at_location(
&self,
item: ItemStack,
y_offset: f64,
) -> Option<Arc<ItemEntity>>
fn spawn_at_location( &self, item: ItemStack, y_offset: f64, ) -> Option<Arc<ItemEntity>>
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§impl Projectile for EnderPearlEntity
impl Projectile for EnderPearlEntity
Source§fn projectile_base(&self) -> &ProjectileBase
fn projectile_base(&self) -> &ProjectileBase
Source§fn on_hit_entity(&self, entity: &SharedEntity, _location: DVec3)
fn on_hit_entity(&self, entity: &SharedEntity, _location: DVec3)
Projectile.onHitEntity (no-op by default).Source§fn on_hit(&self, hit: &ProjectileHit)
fn on_hit(&self, hit: &ProjectileHit)
Projectile.onHit. Subclasses override this and call
Projectile::projectile_on_hit for the base dispatch (super.onHit()).Source§fn calculate_horizontal_hurt_knockback_direction(
&self,
_hurt_entity: &dyn LivingEntity,
_damage_source: &DamageSource,
) -> (f64, f64)
fn calculate_horizontal_hurt_knockback_direction( &self, _hurt_entity: &dyn LivingEntity, _damage_source: &DamageSource, ) -> (f64, f64)
Source§fn set_owner_uuid(&self, owner: Option<Uuid>)
fn set_owner_uuid(&self, owner: Option<Uuid>)
EntityReference; Steel stores the
UUID and resolves lazily.Source§fn set_owner_entity(&self, owner: Option<&SharedEntity>)
fn set_owner_entity(&self, owner: Option<&SharedEntity>)
Source§fn cache_owner_entity(&self, owner: &SharedEntity)
fn cache_owner_entity(&self, owner: &SharedEntity)
Source§fn owner_uuid(&self) -> Option<Uuid>
fn owner_uuid(&self) -> Option<Uuid>
Source§fn get_owner(&self) -> Option<SharedEntity>
fn get_owner(&self) -> Option<SharedEntity>
Projectile.getOwner).Source§fn projectile_may_interact(&self, world: &World, pos: BlockPos) -> bool
fn projectile_may_interact(&self, world: &World, pos: BlockPos) -> bool
Projectile.mayInteract for a block position.Source§fn has_been_shot(&self) -> bool
fn has_been_shot(&self) -> bool
Projectile.hasBeenShot.Source§fn set_has_been_shot(&self, value: bool)
fn set_has_been_shot(&self, value: bool)
Projectile.hasBeenShot.Source§fn left_owner(&self) -> bool
fn left_owner(&self) -> bool
Projectile.leftOwner.Source§fn check_left_owner(&self)
fn check_left_owner(&self)
Projectile.checkLeftOwner.Source§fn reset_left_owner_checked(&self)
fn reset_left_owner_checked(&self)
tick).Source§fn is_outside_owner_collision_range(&self) -> bool
fn is_outside_owner_collision_range(&self) -> bool
Projectile.isOutsideOwnerCollisionRange.Source§fn can_hit_entity(&self, entity: &dyn Entity) -> bool
fn can_hit_entity(&self, entity: &dyn Entity) -> bool
Projectile.canHitEntity.Source§fn get_movement_to_shoot(
&self,
direction: DVec3,
power: f32,
uncertainty: f32,
) -> DVec3
fn get_movement_to_shoot( &self, direction: DVec3, power: f32, uncertainty: f32, ) -> DVec3
Projectile.getMovementToShoot.Source§fn shoot(&self, direction: DVec3, power: f32, uncertainty: f32)
fn shoot(&self, direction: DVec3, power: f32, uncertainty: f32)
Projectile.shoot.Source§fn shoot_from_rotation(
&self,
source: &dyn Entity,
x_rot: f32,
y_rot: f32,
y_offset: f32,
power: f32,
uncertainty: f32,
)
fn shoot_from_rotation( &self, source: &dyn Entity, x_rot: f32, y_rot: f32, y_offset: f32, power: f32, uncertainty: f32, )
Projectile.shootFromRotation.Source§fn update_rotation(&self)
fn update_rotation(&self)
Projectile.updateRotation (lerped toward the movement vector).Source§fn deflect(
&self,
deflection: ProjectileDeflection,
deflecting_entity: Option<&dyn Entity>,
new_owner_uuid: Option<Uuid>,
new_owner_entity: Option<&SharedEntity>,
by_attack: bool,
) -> bool
fn deflect( &self, deflection: ProjectileDeflection, deflecting_entity: Option<&dyn Entity>, new_owner_uuid: Option<Uuid>, new_owner_entity: Option<&SharedEntity>, by_attack: bool, ) -> bool
Source§fn on_deflection(&self, _by_attack: bool)
fn on_deflection(&self, _by_attack: bool)
Source§fn should_bounce_on_world_border(&self) -> bool
fn should_bounce_on_world_border(&self) -> bool
Source§fn get_hit_result_on_move_vector(&self) -> Option<ProjectileHit>
fn get_hit_result_on_move_vector(&self) -> Option<ProjectileHit>
ProjectileUtil.getHitResultOnMoveVector with this::canHitEntity).Source§fn hit_target_or_deflect_self(
&self,
hit: &ProjectileHit,
) -> ProjectileDeflection
fn hit_target_or_deflect_self( &self, hit: &ProjectileHit, ) -> ProjectileDeflection
Projectile.hitTargetOrDeflectSelf.Source§fn projectile_on_hit(&self, hit: &ProjectileHit)
fn projectile_on_hit(&self, hit: &ProjectileHit)
Projectile.onHit dispatch to block/entity handlers. Not meant to
be overridden — override Projectile::on_hit and delegate here instead.Source§fn on_hit_block(&self, hit: &ClipHitResult)
fn on_hit_block(&self, hit: &ClipHitResult)
Projectile.onHitBlock.Source§fn projectile_on_hit_block(&self, hit: &ClipHitResult)
fn projectile_on_hit_block(&self, hit: &ClipHitResult)
Projectile.onHitBlock implementation. Concrete projectiles
that override the hook call this to preserve the Java super dispatch.Source§fn projectile_base_tick(&self)
fn projectile_base_tick(&self)
Projectile.tick (the super.tick() reached from subclasses).Source§fn save_projectile(&self, nbt: &mut NbtCompound)
fn save_projectile(&self, nbt: &mut NbtCompound)
Projectile fields (Owner, LeftOwner, HasBeenShot).Source§fn load_projectile(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn load_projectile(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
Projectile fields.Source§impl ThrowableItemProjectile for EnderPearlEntity
impl ThrowableItemProjectile for EnderPearlEntity
Source§fn get_default_item(&self) -> ItemRef
fn get_default_item(&self) -> ItemRef
ThrowableItemProjectile.getDefaultItem.Source§fn set_item(&self, item: ItemStack)
fn set_item(&self, item: ItemStack)
setItem, count clamped to 1). Read moreSource§fn set_item_clamped(&self, item: ItemStack)
fn set_item_clamped(&self, item: ItemStack)
ThrowableItemProjectile.setItem count-clamping helper.Source§fn save_throwable_item(&self, nbt: &mut NbtCompound)
fn save_throwable_item(&self, nbt: &mut NbtCompound)
addAdditionalSaveData).Source§fn load_throwable_item(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn load_throwable_item(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
readAdditionalSaveData).Source§impl ThrowableProjectile for EnderPearlEntity
impl ThrowableProjectile for EnderPearlEntity
Source§fn get_air_drag(&self) -> f32
fn get_air_drag(&self) -> f32
ThrowableProjectile.getAirDrag.Source§fn throwable_default_gravity(&self) -> f64
fn throwable_default_gravity(&self) -> f64
ThrowableProjectile.getDefaultGravity (0.03).Source§fn apply_inertia(&self)
fn apply_inertia(&self)
ThrowableProjectile.applyInertia (water vs air drag).Source§fn throwable_projectile_tick(&self)
fn throwable_projectile_tick(&self)
ThrowableProjectile.tick. Read moreAuto Trait Implementations§
impl !Freeze for EnderPearlEntity
impl !RefUnwindSafe for EnderPearlEntity
impl !UnwindSafe for EnderPearlEntity
impl Send for EnderPearlEntity
impl Sync for EnderPearlEntity
impl Unpin for EnderPearlEntity
impl UnsafeUnpin for EnderPearlEntity
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<>>