aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rwxr-xr-xsrc/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt
index 59356f30d..f569a0f21 100755
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.garden
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.GardenToolChangeEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.round
import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings
import net.minecraft.client.Minecraft
@@ -16,8 +17,10 @@ class GardenYawAndPitch {
@SubscribeEvent
fun onRenderOverlay(event: GuiRenderEvent.GameOverlayRenderEvent) {
- if (!isEnabled()) return
- if (GardenAPI.toolInHand == null) return
+ if (!LorenzUtils.inSkyBlock) return
+ if (!config.enabled) return
+ if (!GardenAPI.inGarden() && !config.showEverywhere) return
+ if (GardenAPI.toolInHand == null && !config.showWithoutTool) return
val player = Minecraft.getMinecraft().thePlayer
@@ -38,13 +41,15 @@ class GardenYawAndPitch {
"§aYaw: §f${yaw.toDouble().round(config.yawPrecision)}",
"§aPitch: §f${pitch.toDouble().round(config.pitchPrecision)}",
)
- config.pos.renderStrings(displayList, posLabel = "Yaw and Pitch")
+ if (GardenAPI.inGarden()) {
+ config.pos.renderStrings(displayList, posLabel = "Yaw and Pitch")
+ } else {
+ config.posOutside.renderStrings(displayList, posLabel = "Yaw and Pitch")
+ }
}
@SubscribeEvent
fun onGardenToolChange(event: GardenToolChangeEvent) {
lastChange = System.currentTimeMillis()
}
-
- private fun isEnabled() = GardenAPI.inGarden() && config.enabled
-}
+} \ No newline at end of file