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:
Ludovic MarieandClaude Opus 5.5 committed 2026-11-04 17:58:05 +01:00
1 parent 3038fdf208
commit a89eb944c6
1 file changed
+10 -7
+10 -7
View File
@@ -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))
}
}