pub(crate) struct ExplosionExposureRaycast<'world> {
world: &'world World,
collision_context: BlockCollisionContext,
full_chunks: LocalFullChunkHolderCache,
entries: [ExplosionExposureCacheEntry; 256],
clear_grid: ExplosionExposureClearGrid,
generation: u32,
}Expand description
Bounded cache for vanilla explosion exposure rays.
Missing chunks are never cached, allowing asynchronous Full publication to become visible while the synchronous gameplay callback is running. Dynamic and non-Vanilla collision shapes are resolved on every visit so live block entities and plugin callbacks retain their normal query semantics. Reuse across entities is only valid when the caller can prove that the intervening entity callbacks cannot mutate blocks; callers must clear the cache before invoking any other entity implementation.
Fields§
§world: &'world World§collision_context: BlockCollisionContext§full_chunks: LocalFullChunkHolderCache§entries: [ExplosionExposureCacheEntry; 256]§clear_grid: ExplosionExposureClearGrid§generation: u32Implementations§
Source§impl<'world> ExplosionExposureRaycast<'world>
impl<'world> ExplosionExposureRaycast<'world>
pub(crate) const fn new( world: &'world World, collision_context: BlockCollisionContext, ) -> Self
Sourcepub(crate) fn configure_clear_grid(&mut self, min: BlockPos, max: BlockPos)
pub(crate) fn configure_clear_grid(&mut self, min: BlockPos, max: BlockPos)
Configures a bounded, explosion-local cache of statically clear positions.
Bounds that exceed the inline capacity disable the optimization and retain the exact compatibility path.
Sourcepub(crate) const fn set_collision_context(
&mut self,
collision_context: BlockCollisionContext,
)
pub(crate) const fn set_collision_context( &mut self, collision_context: BlockCollisionContext, )
Selects the entity collision context used by subsequent exposure rays.
Sourcepub(crate) fn stable_air_box_is_clear(
&mut self,
bounds: BlockRegionBounds,
) -> bool
pub(crate) fn stable_air_box_is_clear( &mut self, bounds: BlockRegionBounds, ) -> bool
Proves that an inclusive block box contains only immutable Vanilla air.
Sourcefn retain_cache_after_collision_query(&mut self, block: BlockRef) -> bool
fn retain_cache_after_collision_query(&mut self, block: BlockRef) -> bool
Keeps cached shapes only across Steel-owned Vanilla collision behavior calls.
Plugin behavior may mutate another block while answering a shape query. Clearing after its callback makes the next Vanilla DDA visit read the same live state Vanilla would observe.
Sourcepub(crate) fn is_path_clear(&mut self, from: DVec3, to: DVec3) -> bool
pub(crate) fn is_path_clear(&mut self, from: DVec3, to: DVec3) -> bool
Returns whether a collider-only, fluid-free exposure ray misses every block.
fn block_intersects_ray( &mut self, pos: BlockPos, from: DVec3, to: DVec3, ) -> bool
fn block_intersects_ray_exact( &mut self, pos: BlockPos, from: DVec3, to: DVec3, unresolved_grid_index: Option<usize>, ) -> bool
fn static_collision_intersects( collision: OffsetVoxelShape, pos: BlockPos, from: DVec3, to: DVec3, ) -> bool
Auto Trait Implementations§
impl<'world> !RefUnwindSafe for ExplosionExposureRaycast<'world>
impl<'world> !UnwindSafe for ExplosionExposureRaycast<'world>
impl<'world> Freeze for ExplosionExposureRaycast<'world>
impl<'world> Send for ExplosionExposureRaycast<'world>
impl<'world> Sync for ExplosionExposureRaycast<'world>
impl<'world> Unpin for ExplosionExposureRaycast<'world>
impl<'world> UnsafeUnpin for ExplosionExposureRaycast<'world>
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
§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> ⓘ
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> ⓘ
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 moreArc<SyncMutex<>>