struct PistonMovingState {
moved_state: BlockStateId,
direction: Direction,
extending: bool,
source_piston: bool,
progress: f32,
progress_o: f32,
last_ticked: i64,
}Fields§
§moved_state: BlockStateId§direction: Direction§extending: bool§source_piston: bool§progress: f32§progress_o: f32§last_ticked: i64Implementations§
Source§impl PistonMovingState
impl PistonMovingState
fn can_move_collided_entity(entity: &dyn Entity, cause_bounce: bool) -> bool
const fn movement_direction(self) -> Direction
fn extended_progress(self, progress: f32) -> f32
fn state_collision_boxes( state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, ) -> BlockCollisionBoxes
fn boxes_bounds(boxes: &BlockCollisionBoxes) -> Option<BlockLocalAabb>
Sourcepub fn collision_boxes(
&self,
world: &dyn LevelReader,
pos: BlockPos,
) -> BlockCollisionBoxes
pub fn collision_boxes( &self, world: &dyn LevelReader, pos: BlockPos, ) -> BlockCollisionBoxes
Resolves the transient collision boxes at the current progress.
fn move_by_position_and_progress( &self, pos: BlockPos, aabb: BlockLocalAabb, ) -> WorldAabb
fn movement_area( aabb: WorldAabb, direction: Direction, amount: f64, ) -> WorldAabb
fn overlap_movement( outside: WorldAabb, movement: Direction, entity: WorldAabb, ) -> f64
fn move_entity_by_piston( piston_direction: Direction, entity: &dyn Entity, delta: f64, movement: Direction, )
fn fix_entity_within_piston_base( pos: BlockPos, entity: &dyn Entity, direction: Direction, delta_progress: f64, )
fn move_collided_entities( self, world: &Arc<World>, pos: BlockPos, new_progress: f32, )
fn move_stuck_entities( self, world: &Arc<World>, pos: BlockPos, new_progress: f32, )
fn finish_tick(self, world: &Arc<World>, pos: BlockPos)
fn finish_movement_early(self, world: &Arc<World>, pos: BlockPos)
const fn direction_from_legacy_id(id: i8) -> Direction
const fn direction_legacy_id(direction: Direction) -> i8
Trait Implementations§
Source§impl Clone for PistonMovingState
impl Clone for PistonMovingState
Source§fn clone(&self) -> PistonMovingState
fn clone(&self) -> PistonMovingState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PistonMovingState
Auto Trait Implementations§
impl Freeze for PistonMovingState
impl RefUnwindSafe for PistonMovingState
impl Send for PistonMovingState
impl Sync for PistonMovingState
impl Unpin for PistonMovingState
impl UnsafeUnpin for PistonMovingState
impl UnwindSafe for PistonMovingState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>