Skip to main content

BlockAttachedEntity

Trait BlockAttachedEntity 

Source
pub trait BlockAttachedEntity: Entity {
Show 16 methods // Required methods fn block_attached_entity_base(&self) -> &BlockAttachedEntityBase; fn survives(&self) -> bool; fn drop_item(&self, caused_by: Option<&dyn Entity>); fn recalculate_bounding_box(&self) -> Result<(), EntityMoveError>; // Provided methods fn tick_block_attached_entity(self: Arc<Self>) { ... } fn is_pickable_block_attached_entity(&self) -> bool { ... } fn skip_attack_interaction_block_attached_entity( &self, source: &SharedEntity, ) -> bool { ... } fn kill_attributed(&self, attributed_to: Option<&dyn Entity>) { ... } fn hurt_block_attached_entity( &self, world: &World, source: &DamageSource, _amount: f32, ) -> bool { ... } fn drop_if_dvec3_is_nonzero(&self, impulse: DVec3) { ... } fn move_entity_block_attached_entity( self: Arc<Self>, _mover_type: MoverType, delta: DVec3, ) -> Option<MoveResult> { ... } fn push_impulse_block_attached_entity(&self, impulse: DVec3) { ... } fn save_block_attached_entity(&self, nbt: &mut NbtCompound) { ... } fn load_block_attached_entity(&self, nbt: BorrowedNbtCompoundView<'_, '_>) { ... } fn refresh_dimensions_block_attached_entity(&self) { ... } fn try_set_position_block_attached_entity( &self, pos: DVec3, ) -> Result<(), EntityMoveError> { ... }
}

Required Methods§

Source

fn block_attached_entity_base(&self) -> &BlockAttachedEntityBase

Returns the shared block-attached entity runtime state.

Source

fn survives(&self) -> bool

Source

fn drop_item(&self, caused_by: Option<&dyn Entity>)

Source

fn recalculate_bounding_box(&self) -> Result<(), EntityMoveError>

Provided Methods§

Source

fn tick_block_attached_entity(self: Arc<Self>)

Source

fn is_pickable_block_attached_entity(&self) -> bool

Source

fn skip_attack_interaction_block_attached_entity( &self, source: &SharedEntity, ) -> bool

Source

fn kill_attributed(&self, attributed_to: Option<&dyn Entity>)

Removes this entity as killed, attributing the death game event to attributed_to (or to this entity when None).

Source

fn hurt_block_attached_entity( &self, world: &World, source: &DamageSource, _amount: f32, ) -> bool

Source

fn drop_if_dvec3_is_nonzero(&self, impulse: DVec3)

Source

fn move_entity_block_attached_entity( self: Arc<Self>, _mover_type: MoverType, delta: DVec3, ) -> Option<MoveResult>

Source

fn push_impulse_block_attached_entity(&self, impulse: DVec3)

Source

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

Source

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

Source

fn refresh_dimensions_block_attached_entity(&self)

Source

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§