pub(super) struct PistonStructureResolver<'a> {
level: &'a dyn PistonLevel,
piston_pos: BlockPos,
extending: bool,
start_pos: BlockPos,
push_direction: Direction,
piston_direction: Direction,
to_push: Vec<BlockPos>,
to_destroy: Vec<BlockPos>,
}Fields§
§level: &'a dyn PistonLevel§piston_pos: BlockPos§extending: bool§start_pos: BlockPos§push_direction: Direction§piston_direction: Direction§to_push: Vec<BlockPos>§to_destroy: Vec<BlockPos>Implementations§
Source§impl<'a> PistonStructureResolver<'a>
impl<'a> PistonStructureResolver<'a>
pub(super) fn new( level: &'a dyn PistonLevel, piston_pos: BlockPos, direction: Direction, extending: bool, ) -> Self
pub(super) fn resolve(&mut self) -> bool
fn is_sticky(state: BlockStateId) -> bool
fn can_stick_to_each_other(first: BlockStateId, second: BlockStateId) -> bool
fn add_block_line(&mut self, start: BlockPos, direction: Direction) -> bool
fn reorder_list_at_collision( &mut self, blocks_added: usize, collision_pos: usize, )
fn add_branching_blocks(&mut self, from_pos: BlockPos) -> bool
pub(super) const fn push_direction(&self) -> Direction
pub(super) fn to_push(&self) -> &[BlockPos]
pub(super) fn to_destroy(&self) -> &[BlockPos]
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PistonStructureResolver<'a>
impl<'a> !Send for PistonStructureResolver<'a>
impl<'a> !Sync for PistonStructureResolver<'a>
impl<'a> !UnwindSafe for PistonStructureResolver<'a>
impl<'a> Freeze for PistonStructureResolver<'a>
impl<'a> Unpin for PistonStructureResolver<'a>
impl<'a> UnsafeUnpin for PistonStructureResolver<'a>
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
§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<>>