Skip to main content

RawEntity

Struct RawEntity 

Source
pub struct RawEntity {
    base: EntityBase,
    entity_type: EntityTypeRef,
    data: SyncMutex<NbtCompound>,
}
Expand description

Steel-specific fallback for entity types whose runtime behavior is not implemented yet.

Vanilla has concrete classes for every entity type. Steel uses this only to preserve worldgen and disk NBT until the corresponding typed implementation is added.

Fields§

§base: EntityBase§entity_type: EntityTypeRef§data: SyncMutex<NbtCompound>

Implementations§

Source§

impl RawEntity

Source

pub fn new( id: i32, position: DVec3, world: Weak<World>, entity_type: EntityTypeRef, ) -> Self

Creates a fresh raw entity for an entity type Steel cannot behaviorally model yet.

Source

pub fn from_saved(load: EntityBaseLoad, entity_type: EntityTypeRef) -> Self

Creates a raw entity from base entity data.

Source

pub fn snap_to(&self, position: DVec3, yaw: f32, pitch: f32)

Sets position and rotation, matching vanilla Entity.snapTo.

§Panics

Panics if the active world entity manager rejects the snap position. This is an invariant failure for loaded raw entities.

Source

pub fn set_persistence_required(&self)

Marks a raw mob as persistent when vanilla structure generation would do so.

Source§

impl RawEntity

Trait Implementations§

Source§

impl DowncastType for RawEntity

Source§

const TYPE_KEY: DowncastTypeKey

The process-wide key for this concrete type.
Source§

impl Entity for RawEntity

Source§

fn base(&self) -> &EntityBase

Returns a reference to the entity’s shared vanilla base fields.
Source§

fn entity_type(&self) -> EntityTypeRef

Gets the entity type containing tracking range, dimensions, etc.
Source§

fn tick(&self)

Called every game tick when the entity is in a ticked chunk. Read more
Source§

fn attackable(&self) -> bool

Returns whether this entity can be attacked. Read more
Source§

fn projectile_owner_uuid(&self) -> Option<Uuid>

Returns the vanilla Projectile owner UUID when this entity exposes one.
Source§

fn load_additional(&self, nbt: BorrowedNbtCompoundView<'_, '_>)

Loads type-specific entity data from NBT. Read more
Source§

fn save_additional(&self, nbt: &mut NbtCompound)

Saves type-specific entity data to NBT. Read more
Source§

fn is_always_ticking(&self) -> bool

Returns whether this entity ignores chunk ticking visibility. Read more
Source§

fn broadcast_to_player(&self, _player: &Player) -> bool

Returns whether this entity should be broadcast to the given player. Read more
Source§

fn id(&self) -> i32

Gets the entity’s unique network ID (session-local).
Source§

fn uuid(&self) -> Uuid

Gets the UUID of the entity (persistent identifier).
Source§

fn scoreboard_name(&self) -> String

Returns this entity’s vanilla scoreboard holder name. Read more
Source§

fn name(&self) -> TextComponent

Returns this entity’s vanilla name component before team decoration.
Source§

fn display_name(&self) -> TextComponent

Returns this entity’s vanilla display name.
Source§

fn plain_text_name(&self) -> String

Returns this entity’s plain vanilla name. Read more
Source§

fn nbt_for_data_compare(&self) -> NbtCompound

Returns the vanilla-shaped entity NBT used by command predicates. Read more
Source§

fn nbt_for_passenger_save(&self) -> Option<NbtCompound>

Returns passenger-save NBT including the entity type id.
Source§

fn position(&self) -> DVec3

Gets the entity’s current position.
Source§

fn spawn_position(&self) -> DVec3

Gets the position to send in this entity’s add-entity packet. Read more
Source§

fn block_position(&self) -> BlockPos

Gets the entity’s current block position.
Source§

fn in_block_state(&self, world: &World) -> BlockStateId

Returns vanilla Entity.getInBlockState.
Source§

fn old_position(&self) -> DVec3

Gets the entity position used by vanilla movement traces.
Source§

fn bounding_box(&self) -> WorldAabb

Gets the entity’s bounding box for collision queries.
Source§

fn is_free(&self, delta: DVec3) -> bool

Returns vanilla Entity.isFree() for the current bounding box shifted by delta.
Source§

fn blocks_building(&self) -> bool

Returns whether this entity obstructs block placement. Read more
Source§

fn is_pickable(&self) -> bool

Returns whether this entity can be targeted by picking and interaction raycasts. Read more
Source§

fn skip_attack_interaction(&self, _source: &dyn Entity) -> bool

Returns whether this entity handles and consumes an attack before normal damage. Read more
Source§

fn is_pushable(&self) -> bool

Returns whether this entity participates in vanilla push separation. Read more
Source§

fn is_pushed_by_fluid(&self) -> bool

Returns whether vanilla fluid currents can push this entity.
Source§

fn on_above_bubble_column(&self, drag_down: bool, _pos: BlockPos)

Applies vanilla Entity.onAboveBubbleColumn.
Source§

fn on_inside_bubble_column(&self, drag_down: bool)

Applies vanilla Entity.onInsideBubbleColumn.
Source§

fn is_spectator(&self) -> bool

Returns whether this entity is invisible to normal entity selectors. Read more
Source§

fn is_ignoring_block_triggers(&self) -> bool

Returns whether this entity is excluded from pressure plates and tripwires. Read more
Source§

fn piston_push_reaction(&self) -> PushReaction

Returns how vanilla lets this entity respond to piston movement.
Source§

fn is_supported_by(&self, pos: BlockPos) -> bool

Returns whether this entity’s main supporting block is pos.
Source§

fn can_interact_with_level(&self) -> bool

Returns whether vanilla lets this entity interact with its loaded level.
Source§

fn is_invisible(&self) -> bool

Returns vanilla Entity.isInvisible().
Source§

fn is_discrete(&self) -> bool

Returns vanilla Entity.isDiscrete().
Source§

fn is_allied_to(&self, _other: &dyn Entity) -> bool

Returns whether this entity is allied to other.
Source§

fn is_marker_armor_stand(&self) -> bool

Returns whether this entity is a marker armor stand.
Source§

fn is_tame_owned_by(&self, _owner: &dyn LivingEntity) -> bool

Returns whether this entity is a tameable animal owned by owner.
Source§

fn projectile_owner(&self) -> Option<SharedEntity>

Returns the live vanilla Projectile owner when this entity exposes one.
Source§

fn is_flying_player(&self) -> bool

Returns true for vanilla players whose abilities have flying set.
Source§

fn can_be_collided_with(&self, _other: Option<&dyn Entity>) -> bool

Returns whether other can collide with this entity. Read more
Source§

fn can_be_hit_by_projectile(&self) -> bool

Returns whether projectile collision may interact with this entity. Read more
Source§

fn deflection(&self, _projectile: &dyn Projectile) -> ProjectileDeflection

Returns this entity’s Vanilla projectile deflection behavior.
Source§

fn vehicle(&self) -> Option<SharedEntity>

Gets the vehicle this entity is riding, if present. Read more
Source§

fn controlled_vehicle(&self) -> Option<SharedEntity>

Returns the vehicle this entity directly controls, if any. Read more
Source§

fn is_passenger(&self) -> bool

Returns whether this entity is riding another entity. Read more
Source§

fn can_ride(&self, _vehicle: &dyn Entity) -> bool

Returns whether vanilla allows this entity to start riding vehicle. Read more
Source§

fn stop_riding(&self)

Stops riding the current vehicle, if any. Read more
Source§

fn start_riding(&self, entity_to_ride: &SharedEntity) -> bool

Starts riding entity_to_ride if vanilla boarding rules allow it. Read more
Source§

fn passengers(&self) -> Vec<SharedEntity>

Gets this entity’s direct passengers. Read more
Source§

fn count_player_passengers(&self) -> usize

Counts indirect player passengers. Read more
Source§

fn has_exactly_one_player_passenger(&self) -> bool

Returns whether this entity has exactly one indirect player passenger. Read more
Source§

fn first_passenger(&self) -> Option<SharedEntity>

Gets this entity’s first direct passenger. Read more
Source§

fn controlling_passenger(&self) -> Option<SharedEntity>

Returns the living passenger currently controlling this entity, if any. Read more
Source§

fn can_control_vehicle(&self) -> bool

Returns whether this entity can control a vehicle it is riding. Read more
Source§

fn has_controlling_passenger(&self) -> bool

Returns whether this entity currently has a controlling passenger. Read more
Source§

fn is_vehicle(&self) -> bool

Returns whether this entity has any direct passengers. Read more
Source§

fn dismounts_underwater(&self) -> bool

Returns vanilla Entity.dismountsUnderwater.
Source§

fn has_passenger(&self, passenger: &dyn Entity) -> bool

Returns whether passenger is a direct passenger of this entity. Read more
Source§

fn can_add_passenger(&self, _passenger: &dyn Entity) -> bool

Returns whether this entity can accept passenger as a direct passenger. Read more
Source§

fn could_accept_passenger(&self) -> bool

Returns whether this entity can accept any passenger. Read more
Source§

fn passenger_index(&self, passenger: &dyn Entity) -> Option<usize>

Returns the current direct passenger index for attachment lookup.
Source§

fn vehicle_attachment_point(&self, _vehicle: &dyn Entity) -> DVec3

Returns this passenger’s vehicle attachment point. Read more
Source§

fn passenger_attachment_point(&self, passenger: &dyn Entity) -> DVec3

Returns this vehicle’s passenger attachment point. Read more
Source§

fn passenger_riding_position(&self, passenger: &dyn Entity) -> DVec3

Returns the world position where passenger should ride this vehicle. Read more
Source§

fn position_rider(&self, passenger: &dyn Entity)

Repositions a direct passenger from this vehicle’s attachment point. Read more
Source§

fn root_vehicle_id(&self) -> i32

Returns this entity’s root vehicle ID, or this entity’s ID when it is not riding. Read more
Source§

fn root_vehicle(&self) -> Option<SharedEntity>

Returns this entity’s root vehicle, if this entity is riding one. Read more
Source§

fn is_passenger_of_same_vehicle(&self, other: &dyn Entity) -> bool

Returns whether this entity and other share the same root vehicle. Read more
Source§

fn has_indirect_passenger(&self, entity: &dyn Entity) -> bool

Returns whether entity is an indirect passenger of this entity. Read more
Source§

fn can_collide_with(&self, other: &dyn Entity) -> bool

Returns whether this entity can collide with other. Read more
Source§

fn push_impulse(&self, impulse: DVec3)

Adds an impulse to this entity’s velocity and marks velocity for sync. Read more
Source§

fn push_entity(&self, entity: &dyn Entity)

Applies vanilla entity-to-entity push separation. Read more
Source§

fn make_bounding_box_at(&self, position: DVec3) -> WorldAabb

Builds this entity’s default bounding box at position.
Source§

fn get_relative_portal_position( &self, axis: Axis, portal_area: FoundRectangle, ) -> DVec3

Returns vanilla Entity.getRelativePortalPosition.
Source§

fn default_tick(&self)

Default vanilla Entity.tick() behavior. Read more
Source§

fn ride_tick(&self)

Called every game tick while this entity is riding another entity. Read more
Source§

fn base_tick(&self)

Runs vanilla Entity.baseTick pieces Steel currently implements. Read more
Source§

fn handle_portal(&self)

Runs vanilla Entity.handlePortal behavior currently implemented by Steel.
Source§

fn entity_base_tick(&self)

Runs only vanilla Entity.baseTick behavior. Read more
Source§

fn check_below_world(&self)

Applies vanilla below-world handling.
Source§

fn on_below_world(&self)

Runs entity-specific behavior after falling below the world.
Source§

fn check_despawn(&self)

Runs vanilla pre-tick despawn checks.
Source§

fn apply_inside_block_effect(&self, effect_type: InsideBlockEffectType)

Applies an inside-block effect queued by vanilla’s step-based collector.
Source§

fn level(&self) -> Option<Arc<World>>

Gets the world this entity is in. Read more
Source§

fn pack_dirty_entity_data(&self) -> Option<Vec<DataValue>>

Packs dirty entity data for network synchronization. Read more
Source§

fn pack_all_entity_data(&self) -> Vec<DataValue>

Packs all non-default entity data for initial spawn. Read more
Source§

fn synced_data(&self) -> Option<&dyn EntitySyncedData>

Returns the synchronized entity-data container for entities with vanilla data accessors.
Source§

fn update_data_before_sync(&self)

Updates synchronized entity data just before tracker sync. Read more
Source§

fn is_removed(&self) -> bool

Returns true if the entity has been marked for removal.
Source§

fn is_alive(&self) -> bool

Returns whether this entity is alive for vanilla generic entity checks.
Source§

fn begin_pending_world_change(&self) -> Option<PendingWorldChangeToken>

Marks this entity as waiting for a prepared world change.
Source§

fn finish_pending_world_change(&self, token: PendingWorldChangeToken) -> bool

Clears a pending world change if it still matches the provided token.
Source§

fn is_world_change_pending(&self) -> bool

Returns true while this entity is waiting for a prepared world change.
Source§

fn is_world_change_token_pending(&self, token: PendingWorldChangeToken) -> bool

Returns true if the given world-change token is still pending.
Source§

fn can_use_portal(&self, ignore_passenger: bool) -> bool

Returns whether this entity may enter a portal. Read more
Source§

fn dimension_changing_delay(&self) -> i32

Returns vanilla’s dimension-changing portal cooldown delay in ticks. Read more
Source§

fn removal_reason(&self) -> Option<RemovalReason>

Returns why this entity was removed, if it has been removed.
Source§

fn set_removed(&self, reason: RemovalReason)

Marks the entity as removed with the given reason.
Source§

fn game_event(&self, event: GameEventRef)

Emits a vanilla game event from this entity’s exact position.
Source§

fn kill(&self, world: &World)

Kills this entity using vanilla’s living/non-living class split. Read more
Source§

fn restore_owner_reference(&self, _owner: &SharedEntity)

Caches a live owner reference after restoring persisted owner-linked entities. Most entities do not store owner references.
Source§

fn set_level_callback(&self, callback: Arc<dyn EntityLevelCallback>)

Sets the level callback for lifecycle events (movement, removal).
Source§

fn notify_leash_holder(&self, _leashable: &dyn Entity)

Called by leashables while this entity is their live leash holder.
Source§

fn notify_leashee_removed(&self, _leashable: &dyn Entity)

Called when a leashable stops using this entity as its live leash holder.
Source§

fn player_touch(self: Arc<Self>, _player: &Arc<Player>)

Called when a player touches this entity during nearby pickup processing.
Source§

fn leashables_leashed_to(&self) -> Vec<SharedEntity>

Finds leashable mobs in vanilla’s nearby leash scan whose holder is this entity.
Source§

fn leashables_leashed_to_holder_in_area( &self, holder: &dyn Entity, ) -> Vec<SharedEntity>

Finds leashable mobs in this entity’s nearby leash scan whose holder is holder.
Source§

fn transfer_leashables_from_holder(&self, old_holder: &dyn Entity) -> bool

Transfers leashables currently held by old_holder to this entity.
Source§

fn drop_all_leash_connections(&self, player: Option<&Player>) -> bool

Drops this entity’s leash and all leashables attached to it.
Source§

fn shear_off_all_leash_connections(&self, player: Option<&Player>) -> bool

Shears off all leash connections reachable from this entity.
Source§

fn attempt_to_shear_equipment( &self, player: &Player, hand: InteractionHand, ) -> bool

Runs vanilla Entity.attemptToShearEquipment.
Source§

fn interact( &self, player: &Player, hand: InteractionHand, location: DVec3, ) -> InteractionResult

Handles vanilla entity right-click interaction.
Source§

fn interact_entity( &self, player: &Player, hand: InteractionHand, _location: DVec3, ) -> InteractionResult

Handles shared vanilla Entity.interact behavior.
Source§

fn is_living_entity(&self) -> bool

Returns true for entities that implement vanilla living-entity behavior.
Source§

fn is_abstract_arrow(&self) -> bool

Returns whether this entity belongs to vanilla’s AbstractArrow hierarchy.
Source§

fn as_projectile(&self) -> Option<&dyn Projectile>

Returns this entity as a projectile when it has projectile behavior.
Source§

fn as_living_entity(&self) -> Option<&dyn LivingEntity>

Returns this entity as a living entity when it has living behavior. Read more
Source§

fn as_item_frame(&self) -> Option<&dyn ItemFrame>

Returns this entity as an item frame when it has item-frame behavior. Read more
Source§

fn as_player(&self) -> Option<&Player>

Returns this entity as a player when it is the concrete server player.
Source§

fn with_weapon_item(&self, visitor: &mut dyn FnMut(Option<&ItemStack>))

Visits vanilla Entity.getWeaponItem without copying inventory state.
Source§

fn is_pathfinder_mob(&self) -> bool

Returns true for mobs with pathfinding navigation.
Source§

fn as_pathfinder_mob(&self) -> Option<&dyn PathfinderMob>

Returns this entity as a pathfinder mob when it has pathfinding behavior. Read more
Source§

fn is_mob(&self) -> bool

Returns true for entities that implement vanilla mob behavior.
Source§

fn as_mob(&self) -> Option<&dyn Mob>

Returns this entity as a mob when it has mob behavior. Read more
Source§

fn is_animal(&self) -> bool

Returns true for entities that implement vanilla animal behavior.
Source§

fn as_animal(&self) -> Option<&dyn Animal>

Returns this entity as an animal when it has animal behavior. Read more
Source§

fn is_ageable_mob(&self) -> bool

Returns true for entities that implement vanilla ageable-mob behavior.
Source§

fn as_ageable_mob(&self) -> Option<&dyn AgeableMob>

Returns this entity as an ageable mob when it has ageable behavior. Read more
Source§

fn is_item_steerable(&self) -> bool

Returns true for entities that implement vanilla item-steered boosts.
Source§

fn as_item_steerable(&self) -> Option<&dyn ItemSteerable>

Returns this entity as item steerable when it has item-steering behavior. Read more
Source§

fn forces_fall_flying_velocity_sync(&self) -> bool

Returns true when vanilla ServerEntity should force velocity sync for fall flying.
Source§

fn uses_client_movement_packets(&self) -> bool

Returns true when movement is driven by serverbound movement packets.
Source§

fn is_server_driven_movement(&self) -> bool

Returns true when normal server ticks drive this entity’s movement.
Source§

fn can_simulate_movement(&self) -> bool

Returns true when vanilla allows this side to apply movement simulation side effects.
Source§

fn is_effective_ai(&self) -> bool

Returns true when vanilla allows this side to run entity AI/travel logic.
Source§

fn is_suppressing_bounce(&self) -> bool

Returns true when vanilla landing bounce should be suppressed.
Source§

fn is_stepping_carefully(&self) -> bool

Returns true when vanilla block step-on hooks should treat this entity as careful.
Source§

fn is_descending(&self) -> bool

Returns true when vanilla collision context should treat the entity as descending.
Source§

fn set_shared_shift_key_down(&self, shift_key_down: bool)

Sets the vanilla shift-key-down shared flag.
Source§

fn set_shared_swimming(&self, swimming: bool)

Sets the vanilla swimming shared flag.
Source§

fn update_swimming(&self)

Updates the vanilla swimming shared flag. Read more
Source§

fn default_update_swimming(&self)

Shared body of vanilla Entity.updateSwimming for player overrides.
Source§

fn set_shared_sprinting(&self, sprinting: bool)

Sets the vanilla sprinting shared flag.
Source§

fn set_shared_fall_flying(&self, fall_flying: bool)

Sets the vanilla fall-flying shared flag.
Source§

fn is_flying_vehicle(&self) -> bool

Returns whether vanilla excludes this vehicle from floating kicks.
Source§

fn on_climbable(&self) -> bool

Returns true if vanilla rules consider this entity to be on a climbable block.
Source§

fn known_movement(&self) -> DVec3

Returns the movement vector vanilla exposes for block-contact logic.
Source§

fn known_speed(&self) -> DVec3

Returns the base-tick displacement vanilla exposes as getKnownSpeed.
Source§

fn tick_count(&self) -> i32

Returns vanilla Entity.tickCount.
Source§

fn advance_tick_count(&self)

Advances vanilla Entity.tickCount.
Source§

fn fall_sounds(&self) -> (SoundEventRef, SoundEventRef)

Returns vanilla small and big fall sounds for this entity.
Source§

fn rotation(&self) -> (f32, f32)

Gets the entity’s rotation as (yaw, pitch) in degrees. Read more
Source§

fn set_rotation(&self, rotation: (f32, f32))

Sets the entity’s rotation as (yaw, pitch) in degrees.
Source§

fn direction_yaw(&self) -> Direction

Gets the nearest horizontal direction to the entity’s yaw (horizontal rotation).
Source§

fn look_at(&self, from_anchor: EntityAnchor, target: DVec3)

Rotates this entity to face a fixed position.
Source§

fn look_at_entity( &self, from_anchor: EntityAnchor, target: &dyn Entity, target_anchor: EntityAnchor, )

Rotates this entity to follow an anchored point on another entity.
Source§

fn head_yaw(&self) -> f32

Returns vanilla Entity.getYHeadRot.
Source§

fn spawn_data(&self) -> i32

Extra spawn-packet data used by vanilla for entity-specific construction.
Source§

fn get_eye_height(&self) -> f64

Gets the eye height for this entity. Read more
Source§

fn get_fluid_jump_threshold(&self) -> f64

Returns vanilla Entity.getFluidJumpThreshold().
Source§

fn get_eye_y(&self) -> f64

Gets the Y coordinate of the entity’s eyes. Read more
Source§

fn is_in_wall(&self) -> bool

Mirrors vanilla Entity.isInWall.
Source§

fn calculate_view_vector(&self, pitch_degrees: f32, yaw_degrees: f32) -> DVec3

Calculates vanilla Entity.calculateViewVector().
Source§

fn look_angle(&self) -> DVec3

Returns vanilla Entity.getLookAngle().
Source§

fn hand_holding_item_angle(&self, item: ItemRef) -> DVec3

Returns the vanilla offset for the hand holding item. Read more
Source§

fn velocity(&self) -> DVec3

Gets the entity’s velocity in blocks per tick.
Source§

fn set_velocity(&self, velocity: DVec3)

Sets the entity’s velocity.
Source§

fn needs_velocity_sync(&self) -> bool

Returns true when vanilla ServerEntity should consider sending velocity.
Source§

fn mark_velocity_sync(&self)

Marks velocity for vanilla ServerEntity synchronization.
Source§

fn clear_velocity_sync(&self)

Clears the vanilla velocity sync marker after send processing.
Source§

fn hurt_marked(&self) -> bool

Returns true when vanilla hurt-marked velocity sync is pending.
Source§

fn mark_hurt(&self)

Marks this entity as hurt for vanilla self-inclusive motion sync.
Source§

fn clear_hurt_mark(&self)

Clears the vanilla hurt-marked motion sync flag.
Source§

fn fall_distance(&self) -> f64

Returns accumulated vanilla fall distance.
Source§

fn is_in_powder_snow(&self) -> bool

Returns whether this entity is currently inside powder snow.
Source§

fn was_in_powder_snow(&self) -> bool

Returns whether this entity was inside powder snow during the previous base tick.
Source§

fn set_fall_distance(&self, fall_distance: f64)

Sets accumulated vanilla fall distance.
Source§

fn reset_fall_distance(&self)

Resets accumulated vanilla fall distance.
Source§

fn check_fall_distance_accumulation(&self)

Mirrors vanilla Entity.checkFallDistanceAccumulation().
Source§

fn fire_freeze_state(&self) -> EntityFireFreezeState

Returns the current vanilla fire/freeze state.
Source§

fn remaining_fire_ticks(&self) -> i32

Returns vanilla remainingFireTicks.
Source§

fn set_remaining_fire_ticks(&self, remaining_fire_ticks: i32)

Sets vanilla remainingFireTicks.
Source§

fn ticks_frozen(&self) -> i32

Returns synchronized vanilla TicksFrozen.
Source§

fn set_ticks_frozen(&self, ticks_frozen: i32)

Sets synchronized vanilla TicksFrozen.
Source§

fn fire_immune(&self) -> bool

Returns whether this entity is immune to fire effects and fire damage.
Source§

fn fire_immune_ticks(&self) -> i32

Returns vanilla fire immunity cooldown ticks after not being ignited.
Source§

fn should_play_lava_hurt_sound(&self) -> bool

Returns whether vanilla should play this entity’s lava hurt sound.
Source§

fn lava_hurt(&self)

Applies vanilla lava-contact damage after lava ignition effects.
Source§

fn remaining_fire_ticks_cap(&self) -> Option<i32>

Maximum vanilla remainingFireTicks this entity can store.
Source§

fn fire_ignite_extra_ticks(&self) -> i32

Returns extra ticks added by fire-block ignition before 8-second ignition.
Source§

fn is_on_fire(&self) -> bool

Returns whether the entity is on fire on the server.
Source§

fn has_visual_fire(&self) -> bool

Returns vanilla hasVisualFire.
Source§

fn is_freezing(&self) -> bool

Returns whether the entity has any frozen ticks.
Source§

fn default_can_freeze(&self) -> bool

Returns vanilla Entity.canFreeze() without living-equipment overrides.
Source§

fn can_freeze(&self) -> bool

Returns whether this entity may accumulate frozen ticks.
Source§

fn ticks_required_to_freeze(&self) -> i32

Returns vanilla getTicksRequiredToFreeze.
Source§

fn is_fully_frozen(&self) -> bool

Returns whether this entity has reached full-freeze duration.
Source§

fn percent_frozen(&self) -> f32

Returns vanilla Entity.getPercentFrozen.
Source§

fn clear_freeze(&self)

Clears accumulated freezing.
Source§

fn clear_fire(&self)

Clears fire without resetting the vanilla fire immunity cooldown.
Source§

fn ignite_for_ticks(&self, number_of_ticks: i32)

Ignites this entity for a vanilla tick duration.
Source§

fn sync_base_fire_freeze_entity_data(&self)

Projects base fire/freeze state into generated synced entity data.
Source§

fn sync_base_entity_data(&self)

Projects all base-owned synchronized fields into generated entity data.
Source§

fn is_in_water(&self) -> bool

Returns true if this entity is currently touching water.
Source§

fn is_in_lava(&self) -> bool

Returns true if this entity is currently touching lava.
Source§

fn is_eye_in_water(&self) -> bool

Returns true if this entity’s eyes are currently inside water.
Source§

fn is_eye_in_lava(&self) -> bool

Returns true if this entity’s eyes are currently inside lava.
Source§

fn is_under_water(&self) -> bool

Returns vanilla underwater state.
Source§

fn fluid_contact(&self) -> EntityFluidContact

Returns cached fluid contact from the last entity fluid refresh.
Source§

fn refresh_fluid_contact(&self) -> EntityFluidContact

Refreshes cached fluid contact from this entity’s current bounding box.
Source§

fn refresh_fluid_contact_for_base_tick(&self) -> EntityFluidContact

Refreshes cached fluid contact with vanilla base-tick eye-water history.
Source§

fn scan_and_store_fluid_contact( &self, advance_eye_water_history: bool, ) -> EntityFluidContact

Scans current fluid contact and stores it on the entity base.
Source§

fn apply_fluid_current_for_base_tick( &self, world: &Arc<World>, contact: EntityFluidContact, )

Applies vanilla water/lava current impulses from the base-tick fluid scan.
Source§

fn apply_fluid_current_impulse(&self, impulse: DVec3)

Applies a non-zero fluid current impulse and marks velocity sync.
Source§

fn is_fall_damage_immune(&self) -> bool

Returns true if this entity type ignores vanilla fall damage.
Source§

fn propagate_fall_to_passengers( &self, fall_distance: f64, damage_modifier: f32, source: &DamageSource, )

Propagates vanilla fall-damage handling to passengers.
Source§

fn cause_fall_damage( &self, fall_distance: f64, damage_modifier: f32, source: &DamageSource, ) -> bool

Applies vanilla fall damage. Read more
Source§

fn on_ground(&self) -> bool

Returns true if the entity is on the ground.
Source§

fn horizontal_collision(&self) -> bool

Returns true if the last movement was clipped horizontally.
Source§

fn vertical_collision(&self) -> bool

Returns true if the last movement was clipped vertically.
Source§

fn vertical_collision_below(&self) -> bool

Returns true if the last vertical collision was below the entity.
Source§

fn no_physics(&self) -> bool

Returns true when movement bypasses collision physics.
Source§

fn is_affected_by_blocks(&self) -> bool

Returns true when vanilla block-contact effects may run for this entity.
Source§

fn set_no_physics(&self, no_physics: bool)

Sets whether this entity bypasses collision physics.
Source§

fn update_no_physics_from_current_collision(&self)

Updates item-style noPhysics from the entity’s current collision state.
Source§

fn move_towards_closest_space(&self, x: f64, y: f64, z: f64)

Nudges velocity toward the closest non-full collision block.
Source§

fn default_make_stuck_in_block( &self, _state: BlockStateId, speed_multiplier: DVec3, )

Default vanilla stuck-in-block movement for the next movement pass.
Source§

fn make_stuck_in_block(&self, state: BlockStateId, speed_multiplier: DVec3)

Applies vanilla stuck-in-block movement for the next movement pass.
Source§

fn apply_effects_from_blocks(&self)

Applies current block-contact effects to this entity. Read more
Source§

fn apply_effects_from_blocks_between(&self, from: DVec3, to: DVec3)

Applies block-contact effects for one explicit movement segment. Read more
Source§

fn apply_effects_from_blocks_for_last_movements(&self)

Replays the last finalized block-contact movement list.
Source§

fn set_on_ground(&self, on_ground: bool)

Sets whether the entity is on the ground.
Source§

fn set_on_ground_with_movement( &self, on_ground: bool, horizontal_collision: bool, movement: DVec3, )

Sets ground and horizontal collision flags from accepted movement.
Source§

fn default_apply_accepted_client_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>

Default final state application for accepted client-authored movement. Read more
Source§

fn apply_accepted_client_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>

Applies final state accepted from a client-authored movement packet.
Source§

fn apply_accepted_client_vehicle_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>

Applies final state accepted from a controlled-vehicle movement packet.
Source§

fn try_set_position(&self, pos: DVec3) -> Result<(), EntityMoveError>

Attempts to set the entity’s position through world lifecycle validation.
Source§

fn set_old_position_to_current(&self)

Sets the vanilla movement-trace old position to the current position.
Source§

fn set_old_position(&self, old_position: DVec3)

Sets the vanilla movement-trace old position explicitly.
Source§

fn remove_latest_movement_recording(&self)

Removes the latest movement segment recorded this tick.
Source§

fn on_pos(&self, offset: f32) -> Option<BlockPos>

Returns the block position this entity is standing on.
Source§

fn block_pos_below_that_affects_movement(&self) -> Option<BlockPos>

Returns the block position used for movement-affecting block properties.
Source§

fn on_pos_legacy(&self) -> Option<BlockPos>

Returns vanilla getOnPosLegacy(), used by fall/step block hooks.
Source§

fn block_speed_factor(&self) -> f32

Returns the vanilla block speed factor applied after movement.
Source§

fn block_jump_factor(&self) -> f32

Returns vanilla Entity.getBlockJumpFactor().
Source§

fn pose(&self) -> EntityPose

Returns this entity’s physical pose.
Source§

fn dimensions_for_pose(&self, _pose: EntityPose) -> EntityDimensions

Returns vanilla dimensions for a physical pose.
Source§

fn refresh_dimensions(&self)

Refreshes dimensions for the current physical pose.
Source§

fn set_pose(&self, pose: EntityPose)

Sets the physical pose and synchronized pose metadata.
Source§

fn is_crouching(&self) -> bool

Returns whether vanilla currently considers this entity crouching.
Source§

fn is_swimming(&self) -> bool

Returns whether vanilla currently considers this entity swimming.
Source§

fn is_on_rails(&self) -> bool

Returns whether this entity is on rails.
Source§

fn is_state_climbable(&self, state: BlockStateId) -> bool

Returns whether a block state is climbable for base movement effects.
Source§

fn movement_emission(&self) -> EntityMovementEmission

Returns vanilla movement side effects emitted by this entity.
Source§

fn may_interact(&self, _world: &World, _pos: BlockPos) -> bool

Returns whether this entity may modify the world at a position. Read more
Source§

fn air_supply(&self) -> i32

Returns the synchronized vanilla Air value.
Source§

fn set_air_supply(&self, air_supply: i32)

Sets the synchronized vanilla Air value.
Source§

fn max_air_supply(&self) -> i32

Returns this entity’s maximum vanilla air supply.
Source§

fn portal_cooldown(&self) -> i32

Returns the vanilla portal cooldown in ticks.
Source§

fn set_portal_cooldown(&self, portal_cooldown: i32)

Sets the vanilla portal cooldown in ticks.
Source§

fn is_on_portal_cooldown(&self) -> bool

Returns whether the entity is on vanilla portal cooldown.
Source§

fn reset_portal_cooldown(&self)

Resets vanilla portal cooldown to this entity’s dimension-changing delay. Read more
Source§

fn set_as_inside_portal(&self, portal: PortalKind, entry_position: BlockPos)

Marks this entity as inside a vanilla portal during the current tick. Read more
Source§

fn custom_name(&self) -> Option<TextComponent>

Returns this entity’s optional vanilla custom name.
Source§

fn set_custom_name(&self, custom_name: Option<TextComponent>)

Sets this entity’s optional vanilla custom name.
Source§

fn is_custom_name_visible(&self) -> bool

Returns whether vanilla renders this entity’s custom name.
Source§

fn set_custom_name_visible(&self, visible: bool)

Sets whether vanilla renders this entity’s custom name.
Source§

fn has_glowing_tag(&self) -> bool

Returns whether this entity has the server-owned vanilla glowing tag.
Source§

fn set_glowing_tag(&self, glowing: bool)

Sets this entity’s server-owned vanilla glowing tag.
Source§

fn tags(&self) -> Vec<String>

Returns a snapshot of this entity’s vanilla scoreboard tags.
Source§

fn add_tag(&self, tag: String) -> bool

Adds a vanilla scoreboard tag.
Source§

fn remove_tag(&self, tag: &str) -> bool

Removes a vanilla scoreboard tag.
Source§

fn custom_data(&self) -> NbtCompound

Returns a snapshot of this entity’s vanilla custom data.
Source§

fn set_custom_data(&self, custom_data: NbtCompound)

Replaces this entity’s vanilla custom data.
Source§

fn sound_source(&self) -> SoundSource

Returns this entity’s vanilla sound source category.
Source§

fn swim_sound(&self) -> SoundEventRef

Returns this entity’s vanilla swim sound.
Source§

fn is_silent(&self) -> bool

Returns whether sounds from this entity are suppressed.
Source§

fn set_silent(&self, silent: bool)

Sets whether sounds from this entity are suppressed.
Source§

fn broadcast_entity_event(&self, event: EntityStatus)

Broadcasts a vanilla entity event/status packet near this entity.
Source§

fn play_sound(&self, sound: SoundEventRef, volume: f32, pitch: f32)

Plays an entity sound at the entity’s exact position.
Source§

fn play_entity_on_fire_extinguished_sound(&self)

Plays vanilla’s extinguished-on-fire entity sound.
Source§

fn play_step_sound(&self, _pos: BlockPos, block_state: BlockStateId)

Plays the base vanilla step sound for a block.
Source§

fn play_block_step_sound(&self, block_state: BlockStateId)

Plays a vanilla block step sound at this entity’s current position.
Source§

fn play_muffled_step_sound(&self, block_state: BlockStateId)

Plays vanilla’s muffled secondary step sound.
Source§

fn play_combination_step_sounds( &self, primary_step_sound: BlockStateId, secondary_step_sound: BlockStateId, )

Plays vanilla’s combination primary and secondary step sounds.
Source§

fn walking_step_sound(&self, pos: BlockPos, block_state: BlockStateId)

Plays vanilla walking step sounds, including amethyst chimes.
Source§

fn play_amethyst_step_sound(&self)

Plays vanilla amethyst step chime when its cooldown permits it.
Source§

fn water_swim_sound(&self)

Plays vanilla swim sound from movement emission.
Source§

fn play_swim_sound(&self, volume: f32)

Plays this entity’s swim sound at the given volume.
Source§

fn is_flapping(&self) -> bool

Returns whether the entity is currently flapping.
Source§

fn on_flap(&self)

Runs entity-specific flap side effects.
Source§

fn process_flapping_movement(&self)

Processes vanilla flap movement side effects.
Source§

fn next_step(&self) -> f32

Returns the next step threshold after movement side effects are produced.
Source§

fn apply_movement_emission_and_play_sound( &self, emission: EntityMovementEmission, clipped_movement: DVec3, effect_pos: BlockPos, effect_state: BlockStateId, )

Applies vanilla movement sounds and game events after a completed move.
Source§

fn apply_movement_side_effects_after_move( &self, world: &World, actual_movement: DVec3, )

Applies movement side effects after vanilla collision and landing updates.
Source§

fn vibration_and_sound_effects_from_block( &self, pos: BlockPos, block_state: BlockStateId, should_sound: bool, should_vibrate: bool, clipped_movement: DVec3, ) -> bool

Emits step side effects from a candidate movement-effect block.
Source§

fn max_up_step(&self) -> f32

Maximum height this entity can step up during normal movement.
Source§

fn backs_off_from_edge(&self) -> bool

Whether movement should apply player-style sneak edge prevention.
Source§

fn get_default_gravity(&self) -> f64

Gets the default gravity for this entity type. Read more
Source§

fn is_no_gravity(&self) -> bool

Returns true if gravity is disabled for this entity.
Source§

fn set_no_gravity(&self, no_gravity: bool)

Sets the shared vanilla NoGravity flag.
Source§

fn is_invulnerable(&self) -> bool

Returns the shared vanilla Invulnerable flag.
Source§

fn set_invulnerable(&self, invulnerable: bool)

Sets the shared vanilla Invulnerable flag.
Source§

fn get_gravity(&self) -> f64

Gets the current gravity value. Read more
Source§

fn apply_gravity(&self)

Applies gravity to the entity’s velocity. Read more
Source§

fn move_relative(&self, speed: f32, input: DVec3)

Applies vanilla Entity.moveRelative().
Source§

fn move_without_physics(&self, delta: DVec3) -> Option<MoveResult>

Moves the entity without collision physics.
Source§

fn move_entity(&self, mover_type: MoverType, delta: DVec3) -> Option<MoveResult>

Moves the entity with collision detection. Read more
Source§

fn apply_fall_damage_after_move( &self, result: &MoveResult, world: &Arc<World>, ) -> bool

Applies vanilla fall-distance bookkeeping after accepted movement.
Source§

fn reset_fall_distance_on_resetting_clip( &self, world: &Arc<World>, movement: DVec3, )

Resets fall distance when vanilla’s fall-damage-resetting clip hits.
Source§

fn do_check_fall_damage( &self, movement: DVec3, on_ground: bool, world: &Arc<World>, ) -> bool

Mirrors vanilla Entity.doCheckFallDamage. Read more
Source§

fn refresh_supporting_block_for_fall_damage( &self, movement: DVec3, on_ground: bool, )

Refreshes vanilla supporting-block state before fall-damage side effects.
Source§

fn check_fall_damage( &self, vertical_movement: f64, on_ground: bool, on_state: BlockStateId, pos: BlockPos, world: &Arc<World>, )

Mirrors vanilla Entity.checkFallDamage.
Source§

fn ground_contact_after_movement( &self, on_ground: bool, movement: Option<DVec3>, ) -> EntityGroundContact

Computes vanilla support state for an on-ground update.
Source§

fn check_supporting_block( &self, on_ground: bool, movement: Option<DVec3>, world: &Arc<World>, ) -> EntityGroundContact

Mirrors vanilla Entity.checkSupportingBlock.
Source§

fn spawn_at_location( &self, item: ItemStack, y_offset: f64, ) -> Option<Arc<ItemEntity>>

Spawns an item at this entity’s location. Read more
Source§

fn spawn_at_location_with_offset( &self, item: ItemStack, offset: DVec3, ) -> Option<Arc<ItemEntity>>

Spawns an item at this entity’s location plus a vanilla attachment offset.
Source§

fn hurt(&self, world: &World, source: &DamageSource, amount: f32) -> bool

Applies damage to this entity.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: ErasedType + ?Sized,

Source§

fn is<T>(&self) -> bool
where T: DowncastType,

Returns whether the erased value has concrete type T.
Source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: DowncastType,

Returns the erased value as T when its key matches.
Source§

fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: DowncastType,

Returns the erased value as mutable T when its key matches.
Source§

impl<T> EntityEventSource for T
where T: Entity,

Source§

fn as_entity_event_source(&self) -> &(dyn Entity + 'static)

Returns this entity as a game-event source.
Source§

impl<T> ErasedType for T
where T: DowncastType,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoShared for T

Source§

fn into_shared(self) -> Arc<Mutex<RawMutex, Self>>

Wraps this value in an Arc<SyncMutex<>>
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more