pub(super) struct DefaultRedstoneWireEvaluator {
wire_block: BlockRef,
}Expand description
Persistent evaluator used by RedStoneWireBlock when redstone experiments are disabled.
Fields§
§wire_block: BlockRefImplementations§
Source§impl DefaultRedstoneWireEvaluator
impl DefaultRedstoneWireEvaluator
pub(super) const fn new(wire_block: BlockRef) -> Self
pub(super) fn update_power_strength( &self, world: &Arc<World>, pos: BlockPos, state: BlockStateId, )
fn calculate_target_strength( &self, level: &dyn LevelReader, pos: BlockPos, ) -> i32
Sourcefn get_signal_from_vertical(
&self,
level: &dyn LevelReader,
pos: BlockPos,
state: BlockStateId,
direction: Direction,
context: SignalQueryContext,
ignore_center_signal: bool,
) -> (i32, bool)
fn get_signal_from_vertical( &self, level: &dyn LevelReader, pos: BlockPos, state: BlockStateId, direction: Direction, context: SignalQueryContext, ignore_center_signal: bool, ) -> (i32, bool)
Translation of Lithium’s getSignalFromVertical.
Sourcefn get_non_wire_signal(
&self,
level: &dyn LevelReader,
pos: BlockPos,
state: BlockStateId,
direction: Direction,
context: SignalQueryContext,
ignore_center_signal: bool,
) -> (i32, bool)
fn get_non_wire_signal( &self, level: &dyn LevelReader, pos: BlockPos, state: BlockStateId, direction: Direction, context: SignalQueryContext, ignore_center_signal: bool, ) -> (i32, bool)
Shared translation of the non-wire work in Lithium’s
getSignalFromVertical and getSignalFromSide.
Sourcefn get_direct_signal_to(
&self,
level: &dyn LevelReader,
pos: BlockPos,
direction_to_center: Direction,
context: SignalQueryContext,
ignore_center_signal: bool,
) -> i32
fn get_direct_signal_to( &self, level: &dyn LevelReader, pos: BlockPos, direction_to_center: Direction, context: SignalQueryContext, ignore_center_signal: bool, ) -> i32
Translation of Lithium’s getDirectSignalTo.
Lithium always ignores the direction back to the wire. Steel also runs this path after replacement, so that direction is ignored only while the center is still wire or air.
fn get_wire_signal(&self, state: BlockStateId) -> i32
Auto Trait Implementations§
impl !RefUnwindSafe for DefaultRedstoneWireEvaluator
impl !UnwindSafe for DefaultRedstoneWireEvaluator
impl Freeze for DefaultRedstoneWireEvaluator
impl Send for DefaultRedstoneWireEvaluator
impl Sync for DefaultRedstoneWireEvaluator
impl Unpin for DefaultRedstoneWireEvaluator
impl UnsafeUnpin for DefaultRedstoneWireEvaluator
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<>>