Skip to content

Commit 2a300b6

Browse files
committed
fix: stricten visibility check for worldspace->screenspace conversions
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
1 parent aa3f0ce commit 2a300b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/kotlin/ru/octol1ttle/flightassistant/api/util/ScreenSpace.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ object ScreenSpace {
7474
if (pos == null) {
7575
return false
7676
}
77-
return pos.z > -1 && pos.z < 1
77+
return pos.x >= 0 && pos.x <= mc.window.guiScaledWidth && pos.y >= 0 && pos.y <= mc.window.guiScaledHeight && pos.z > -1 && pos.z < 1
7878
}
7979

8080
fun getX(heading: Float): Int? {

0 commit comments

Comments
 (0)