pub(super) struct BaseRailBlock {
pub(super) block: BlockRef,
is_straight: bool,
}Expand description
Shared server behavior inherited from vanilla’s BaseRailBlock.
Fields§
§block: BlockRef§is_straight: boolImplementations§
Source§impl BaseRailBlock
impl BaseRailBlock
pub(super) const fn new(block: BlockRef, is_straight: bool) -> Self
pub(super) const fn is_straight(&self) -> bool
pub(super) fn is_rail_state(state: BlockStateId) -> bool
fn can_support_rigid_block(level: &dyn LevelReader, pos: BlockPos) -> 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 update_shape( state: BlockStateId, level: &dyn ScheduledTickAccess, pos: BlockPos, ) -> BlockStateId
Sourcepub(super) fn update_state_on_place(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
moved_by_piston: bool,
) -> BlockStateId
pub(super) fn update_state_on_place( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, moved_by_piston: bool, ) -> BlockStateId
Runs vanilla’s initial topology update and straight-rail redstone check.
pub(super) fn update_dir( world: &Arc<World>, pos: BlockPos, state: BlockStateId, first: bool, ) -> BlockStateId
fn should_be_removed( state: BlockStateId, world: &Arc<World>, pos: BlockPos, ) -> bool
Sourcepub(super) fn handle_neighbor_changed(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
moved_by_piston: bool,
) -> bool
pub(super) fn handle_neighbor_changed( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, moved_by_piston: bool, ) -> bool
Returns whether the rail remains in place and subclass handling may run.
pub(super) fn affect_neighbors_after_removal( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, moved_by_piston: bool, )
Auto Trait Implementations§
impl !RefUnwindSafe for BaseRailBlock
impl !UnwindSafe for BaseRailBlock
impl Freeze for BaseRailBlock
impl Send for BaseRailBlock
impl Sync for BaseRailBlock
impl Unpin for BaseRailBlock
impl UnsafeUnpin for BaseRailBlock
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<>>