Skip to content

Commit 78074e1

Browse files
committed
change: hide the attitude display when in mirrored third-person
Signed-off-by: Octol1ttle <[email protected]>
1 parent 5ac47c0 commit 78074e1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/main/kotlin/ru/octol1ttle/flightassistant/impl/computer/data/HudDisplayDataComputer.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class HudDisplayDataComputer(computers: ComputerBus, private val mc: Minecraft)
1717
val player: LocalPlayer
1818
get() = checkNotNull(mc.player)
1919

20+
val isViewMirrored: Boolean
21+
get() = mc.options.cameraType.isMirrored
22+
2023
var lerpedPosition: Vec3 = Vec3.ZERO
2124
private set
2225
var lerpedVelocity: Vec3 = Vec3.ZERO

src/main/kotlin/ru/octol1ttle/flightassistant/impl/display/AttitudeDisplay.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ class AttitudeDisplay(computers: ComputerBus) : Display(computers) {
2424
}
2525

2626
override fun render(guiGraphics: GuiGraphics) {
27+
if (computers.hudData.isViewMirrored) {
28+
return
29+
}
30+
2731
with(guiGraphics) {
2832
pose().push()
2933
//? if <1.21.6

0 commit comments

Comments
 (0)