diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2023-06-22 22:37:53 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-22 14:37:53 +0200 |
commit | 80809a9d62e42155bc520848a1cdd55721d980b0 (patch) | |
tree | abebcda96af13383a2d131d99924850e6aa10eb8 /src/main/java/at/hannibal2/skyhanni/features | |
parent | bda471a30833208d73c691d9bd167bf3d2626ea5 (diff) | |
download | skyhanni-80809a9d62e42155bc520848a1cdd55721d980b0.tar.gz skyhanni-80809a9d62e42155bc520848a1cdd55721d980b0.tar.bz2 skyhanni-80809a9d62e42155bc520848a1cdd55721d980b0.zip |
Merge pull request #247
* done without testing
* fix and diff pos outside of garden
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rwxr-xr-x | src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt | 17 |
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 |