pub(super) struct DiodeBlock {
pub(super) block: BlockRef,
}Expand description
Common server-side behavior inherited from vanilla’s abstract DiodeBlock.
Fields§
§block: BlockRefImplementations§
Source§impl DiodeBlock
impl DiodeBlock
pub(super) const fn new(block: BlockRef) -> Self
pub(super) fn can_survive_on( level: &dyn LevelReader, neighbor_pos: BlockPos, neighbor_state: BlockStateId, ) -> bool
pub(super) fn can_survive(level: &dyn LevelReader, pos: BlockPos) -> bool
pub(super) fn state_for_placement( &self, context: &BlockPlaceContext<'_>, ) -> BlockStateId
pub(super) fn get_input_signal( level: &dyn LevelReader, pos: BlockPos, state: BlockStateId, ) -> i32
pub(super) fn get_alternate_signal( level: &dyn LevelReader, pos: BlockPos, state: BlockStateId, side_input_diodes_only: bool, ) -> i32
pub(super) fn should_prioritize( level: &dyn LevelReader, pos: BlockPos, state: BlockStateId, ) -> bool
pub(super) fn check_tick_on_neighbor( &self, world: &Arc<World>, pos: BlockPos, state: BlockStateId, is_locked: bool, should_turn_on: bool, delay: i32, )
pub(super) fn tick_priority( level: &dyn LevelReader, pos: BlockPos, state: BlockStateId, powered: bool, ) -> TickPriority
pub(super) fn tick( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, is_locked: bool, should_turn_on: bool, delay: i32, )
pub(super) fn handle_neighbor_changed( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, on_supported: impl FnOnce(), )
pub(super) fn set_placed_by( &self, world: &Arc<World>, pos: BlockPos, should_turn_on: bool, )
pub(super) fn on_place( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, )
pub(super) fn affect_neighbors_after_removal( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, moved_by_piston: bool, )
pub(super) fn update_neighbors_in_front( &self, world: &Arc<World>, pos: BlockPos, state: BlockStateId, )
pub(super) fn own_signal(state: BlockStateId, output_signal: i32) -> i32
pub(super) fn signal( state: BlockStateId, direction: Direction, output_signal: i32, ) -> i32
Auto Trait Implementations§
impl !RefUnwindSafe for DiodeBlock
impl !UnwindSafe for DiodeBlock
impl Freeze for DiodeBlock
impl Send for DiodeBlock
impl Sync for DiodeBlock
impl Unpin for DiodeBlock
impl UnsafeUnpin for DiodeBlock
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<>>