mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-08 17:19:10 -10:00
Shulker: a full-cube support is full on every face
canStayAt runs every tick for each shulker; the prepared collision table gives full cubes the canonical Shapes.block() identity, so skip the face shape and XOR join for them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
3038fdf208
commit
a89eb944c6
1 file changed
+10
-7
@@ -206,13 +206,16 @@ impl<'w, 'r> BlockSpace<'w, 'r> {
|
||||
) else {
|
||||
return false;
|
||||
};
|
||||
let full = shape
|
||||
.face_shape(Direction::ALL[open as usize])
|
||||
.is_ok_and(|face| {
|
||||
VoxelShape::block()
|
||||
.join_is_not_empty(&face, ShapeOp::XOR)
|
||||
.is_ok_and(|differs| !differs)
|
||||
});
|
||||
// Block.isFaceFull. A full cube, what shulkers cling to almost always
|
||||
// (canStayAt runs every tick), is full on every face: skip the shape ops.
|
||||
let full = shape.is_block()
|
||||
|| shape
|
||||
.face_shape(Direction::ALL[open as usize])
|
||||
.is_ok_and(|face| {
|
||||
VoxelShape::block()
|
||||
.join_is_not_empty(&face, ShapeOp::XOR)
|
||||
.is_ok_and(|differs| !differs)
|
||||
});
|
||||
full && self.no_collision(m, attachment_box(p, face))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user