Skip to content

Commit

Permalink
Fix raytracing wrong side
Browse files Browse the repository at this point in the history
  • Loading branch information
Meldexun committed Dec 3, 2023
1 parent 4359abf commit 4e7518f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/meldexun/entityculling/util/CullingThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ private boolean checkBoxUncached(double minX, double minY, double minZ, double m
if (IntUtil.anyMatch(
0, stepsY,
0, stepsZ,
(y, z) -> engine.raytraceUncachedThreshold(minX, minY + y * dy, minZ + z * dz, EntityCullingConfig.raytraceThreshold))) {
(y, z) -> engine.raytraceUncachedThreshold(maxX, minY + y * dy, minZ + z * dz, EntityCullingConfig.raytraceThreshold))) {
return true;
}
}
Expand All @@ -495,7 +495,7 @@ private boolean checkBoxUncached(double minX, double minY, double minZ, double m
if (IntUtil.anyMatch(
this.camX < minX ? 1 : 0, this.camX > maxX ? stepsX - 1 : stepsX,
0, stepsZ,
(x, z) -> engine.raytraceUncachedThreshold(minX + x * dx, minY, minZ + z * dz, EntityCullingConfig.raytraceThreshold))) {
(x, z) -> engine.raytraceUncachedThreshold(minX + x * dx, maxY, minZ + z * dz, EntityCullingConfig.raytraceThreshold))) {
return true;
}
}
Expand All @@ -510,7 +510,7 @@ private boolean checkBoxUncached(double minX, double minY, double minZ, double m
if (IntUtil.anyMatch(
this.camX < minX ? 1 : 0, this.camX > maxX ? stepsX - 1 : stepsX,
this.camY < minY ? 1 : 0, this.camY > maxX ? stepsY - 1 : stepsY,
(x, y) -> engine.raytraceUncachedThreshold(minX + x * dx, minY + y * dy, minZ, EntityCullingConfig.raytraceThreshold))) {
(x, y) -> engine.raytraceUncachedThreshold(minX + x * dx, minY + y * dy, maxZ, EntityCullingConfig.raytraceThreshold))) {
return true;
}
}
Expand Down

0 comments on commit 4e7518f

Please sign in to comment.