aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Garden.java14
-rwxr-xr-xsrc/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt17
2 files changed, 24 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java
index c53508dac..84a792a09 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java
@@ -1196,12 +1196,24 @@ public class Garden {
public int timeout = 5;
@Expose
- @ConfigOption(name = "Always Shown", desc = "Always show the Yaw and Pitch overlay, ignoring the timeout.")
+ @ConfigOption(name = "Show Without Tool", desc = "Does not require you to hold a tool for the overlay to show.")
+ @ConfigEditorBoolean
+ public boolean showWithoutTool = false;
+
+ @Expose
+ @ConfigOption(name = "Show Outside Garden", desc = "The overlay will work outside of the garden.")
+ @ConfigEditorBoolean
+ public boolean showEverywhere = false;
+
+ @Expose
+ @ConfigOption(name = "Ignore Timeout", desc = "Ignore the timeout after not moving mouse.")
@ConfigEditorBoolean
public boolean showAlways = false;
@Expose
public Position pos = new Position(445, 225, false, true);
+ @Expose
+ public Position posOutside = new Position(445, 225, false, true);
}
@Expose
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