From be9126ef8f5154ed7f0562e43cbd6c499ca892ba Mon Sep 17 00:00:00 2001 From: martimavocado <39881008+martimavocado@users.noreply.github.com> Date: Wed, 22 Nov 2023 12:50:32 +0000 Subject: Feature: Add support for barn fishing in the jerry's workshop and crimson isle (#705) Added Barn Fishing Timer to Jerry's Workshop and Crimson Isle. #705 --- .../at/hannibal2/skyhanni/config/commands/Commands.kt | 4 ++++ .../config/features/fishing/BarnTimerConfig.java | 16 ++++++++++++++++ .../hannibal2/skyhanni/features/fishing/FishingTimer.kt | 4 ++++ .../at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt | 8 ++++++++ 4 files changed, 32 insertions(+) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 8e4791901..f622ba7bb 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -210,6 +210,10 @@ object Commands { "shclearminiondata", "Reset data about minion profit and the name display on the private island" ) { MinionFeatures.clearMinionData() } + registerCommand( + "whereami", + "Print current island in chat" + ) { SkyHanniDebugsAndTests.whereami() } registerCommand( "shconfig", "Search or reset config elements §c(warning, dangerous!)" diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java index eb0577135..6dbf5b99b 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java @@ -27,6 +27,22 @@ public class BarnTimerConfig { @ConfigEditorBoolean public boolean crystalHollows = true; + @Expose + @ConfigOption( + name = "Lava Fishing", + desc = "Show the Barn Fishing Timer even while in the Crimson Isle." + ) + @ConfigEditorBoolean + public boolean crimsonIsle = true; + + @Expose + @ConfigOption( + name = "Winter Fishing", + desc = "Show the Barn Fishing Timer even on the Jerry's Workshop." + ) + @ConfigEditorBoolean + public boolean winterIsland = true; + @Expose @ConfigOption( name = "Stranded Fishing", diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt index fa2b9b824..501b217f4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt @@ -92,6 +92,10 @@ class FishingTimer { return true } + if (config.crimsonIsle && IslandType.CRIMSON_ISLE.isInIsland()) return true + + if (config.winterIsland && IslandType.WINTER.isInIsland()) return true + if (!IslandType.THE_FARMING_ISLANDS.isInIsland()) { return LocationUtils.playerLocation().distance(barnLocation) < 50 } diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt index 635ea3351..de6ffef21 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt @@ -250,6 +250,14 @@ class SkyHanniDebugsAndTests { LorenzUtils.chat("stopped ${modules.size} listener classes.") } + fun whereami() { + if (LorenzUtils.inSkyBlock) { + LorenzUtils.chat("§eYou are currently in ${LorenzUtils.skyBlockIsland}.") + return + } + LorenzUtils.chat("§eYou are not in Skyblock.") + } + fun copyLocation(args: Array) { val location = LocationUtils.playerLocation() val x = LorenzUtils.formatDouble(location.x + 0.001).replace(",", ".") -- cgit