pub struct Selection {
pub bounds: Aabb,
pub dependency: ShapeDependency,
pub multi_pass_ray: bool,
pub can_collide: bool,
pub can_collide_liquid: bool,
pub has_collision_box: bool,
}Expand description
What the 1.8.9 crosshair ray test (Block.rayTrace via World.rayTrace) sees of a block state.
Fields§
§bounds: AabbBounds after setBoundingBox(world, pos) with all neighbours air (block-local). For
neighbour-dependent blocks this is the isolated shape, see dependency.
dependency: ShapeDependencySame classes as the collision dependency (fences, panes, walls, doors, chests, stairs).
multi_pass_ray: boolStairs: vanilla’s ray test runs 8 passes over half-cube sub-boxes instead of using bounds.
can_collide: boolBlock.canCollide(state, false): rays skip the block when false (air, fire, fluids, …).
can_collide_liquid: boolBlock.canCollide(state, true) (ray tests that stop at fluids).
has_collision_box: boolThe block has a collision box (for ignoreBlockWithoutBoundingBox ray tests).
Trait Implementations§
impl Copy for Selection
impl StructuralPartialEq for Selection
Auto Trait Implementations§
impl Forget for Selection
impl Freeze for Selection
impl RefUnwindSafe for Selection
impl Send for Selection
impl Sync for Selection
impl Unpin for Selection
impl UnsafeUnpin for Selection
impl UnwindSafe for Selection
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