diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-08 09:51:15 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-08 09:51:15 +0200 |
commit | f3d5d4dcb6f9101afc69950a5d45af5dd3da10c9 (patch) | |
tree | 4a3e9d6de9222a5a11388721d3854c4967ee52d8 /src | |
parent | 7ffb72cae177939d52d022da97c67b14a46c3ed9 (diff) | |
download | skyhanni-f3d5d4dcb6f9101afc69950a5d45af5dd3da10c9.tar.gz skyhanni-f3d5d4dcb6f9101afc69950a5d45af5dd3da10c9.tar.bz2 skyhanni-f3d5d4dcb6f9101afc69950a5d45af5dd3da10c9.zip |
Added debug options for fishing hook display.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java | 32 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt | 4 |
2 files changed, 33 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java index 444021146..a2c187fbb 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java @@ -226,12 +226,42 @@ public class FishingConfig { public boolean enabled = true; @Expose - @ConfigOption(name = "Hide Armor Stand", desc = "Hide the original armor stand from Hypixel when the SkyHanni display is enabled.") + @ConfigOption( + name = "Hide Armor Stand", + desc = "Hide the original armor stand from Hypixel when the SkyHanni display is enabled." + ) @ConfigEditorBoolean public boolean hideArmorStand = true; @Expose public Position position = new Position(460, -240, 3.4f); + + @Expose + @ConfigOption( + name = "Debug: Update Interval", + desc = "Changes the time in ticks between updates (should be as high as possible). Default is 20" + ) + @ConfigEditorSlider( + minValue = 1, + maxValue = 80, + minStep = 1 + ) + @ConfigAccordionId(id = 2) + public int debugUpdateInterval = 20; + + @Expose + @ConfigOption( + name = "Debug: Distance", + desc = "Changes the maximal detection distance between the fishing rod bobber and " + + "the armor stand that shows the hypixel timer (should be as low as possible). Default is 0.1" + ) + @ConfigEditorSlider( + minValue = 0.01f, + maxValue = 5f, + minStep = 0.01f + ) + @ConfigAccordionId(id = 2) + public double debugMaxDistance = 0.1; } @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt index 1ecfa75c7..cf9b6141c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt @@ -33,7 +33,7 @@ class FishingHookDisplay { @SubscribeEvent fun onTick(event: LorenzTickEvent) { if (!isEnabled()) return - if (!event.repeatSeconds(1)) return + if (!event.isMod(config.debugUpdateInterval)) return val entities = EntityUtils.getEntities<EntityFishHook>() bobberLocation = entities.firstOrNull { it.angler is EntityPlayerSP }?.getLorenzVec() @@ -47,7 +47,7 @@ class FishingHookDisplay { val bobberLocation = bobberLocation ?: return val distance = entity.getLorenzVec().distance(bobberLocation) - if (distance > 0.1) return + if (distance > config.debugMaxDistance) return if (entity is EntityArmorStand) { armorStand = entity } |