Skip to content

Commit dc56549

Browse files
committed
fix: bound block volume tolerance
1 parent 0311625 commit dc56549

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/skyblock/main.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,16 @@ class StrafingScript {
274274
const y = pos.getY();
275275
const z = pos.getZ();
276276

277+
// Strict block volume check (no extra tolerance)
278+
// We extend the max by 1 to include the width of the block itself (0.0 to 1.0)
277279
const minX = Math.min(p1.x, p2.x);
278-
const maxX = Math.max(p1.x, p2.x);
280+
const maxX = Math.max(p1.x, p2.x) + 1;
279281
const minY = Math.min(p1.y, p2.y);
280-
const maxY = Math.max(p1.y, p2.y);
282+
const maxY = Math.max(p1.y, p2.y) + 1;
281283
const minZ = Math.min(p1.z, p2.z);
282-
const maxZ = Math.max(p1.z, p2.z);
284+
const maxZ = Math.max(p1.z, p2.z) + 1;
283285

284-
return x < minX || x > maxX || y < minY || y > maxY || z < minZ || z > maxZ;
286+
return x < minX || x >= maxX || y < minY || y >= maxY || z < minZ || z >= maxZ;
285287
}
286288

287289
// =========================================================================

0 commit comments

Comments
 (0)