pub(super) struct BasePressurePlateBlock {
pub(super) block: BlockRef,
}Expand description
Common server-side behavior inherited from vanilla’s BasePressurePlateBlock.
Fields§
§block: BlockRefImplementations§
Source§impl BasePressurePlateBlock
impl BasePressurePlateBlock
pub(super) const fn new(block: BlockRef) -> Self
pub(super) fn can_survive(level: &dyn LevelReader, pos: BlockPos) -> bool
pub(super) fn state_for_placement( &self, context: &BlockPlaceContext<'_>, ) -> Option<BlockStateId>
pub(super) fn update_shape( state: BlockStateId, level: &dyn LevelReader, pos: BlockPos, direction: Direction, ) -> BlockStateId
fn update_neighbors(&self, world: &Arc<World>, pos: BlockPos)
pub(super) fn affect_neighbors_after_removal( &self, world: &Arc<World>, pos: BlockPos, moved_by_piston: bool, signal: i32, )
pub(super) fn entity_count( world: &World, pos: BlockPos, class_filter: impl FnMut(&dyn Entity) -> bool, ) -> usize
fn emit_transition_effects( level: &dyn LevelAccessor, source_entity: Option<&dyn Entity>, pos: BlockPos, is_pressed: bool, sound_click_on: SoundEventRef, sound_click_off: SoundEventRef, )
pub(super) fn check_pressed( &self, source_entity: Option<&dyn Entity>, world: &Arc<World>, pos: BlockPos, old_signal: i32, signal: i32, new_state: BlockStateId, pressed_time: i32, sound_click_on: SoundEventRef, sound_click_off: SoundEventRef, )
Auto Trait Implementations§
impl !RefUnwindSafe for BasePressurePlateBlock
impl !UnwindSafe for BasePressurePlateBlock
impl Freeze for BasePressurePlateBlock
impl Send for BasePressurePlateBlock
impl Sync for BasePressurePlateBlock
impl Unpin for BasePressurePlateBlock
impl UnsafeUnpin for BasePressurePlateBlock
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<>>