aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--FEATURES.md1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Fishing.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/OdgerWaypoint.kt62
5 files changed, 71 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 72aadf72d..58af8df52 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
## Features
+ Adding green line around items that are clickable. (Inside the **Not Clickable Items Feature**)
++ Added **Odger waypoint** - Show the Odger waypoint when trophy fishes are in the inventory and no lava rod in hand.
## Version 0.15 (2023-01-22)
diff --git a/FEATURES.md b/FEATURES.md
index b6395f9ed..39d4faf9d 100644
--- a/FEATURES.md
+++ b/FEATURES.md
@@ -101,6 +101,7 @@
- Highlight Thunder Sparks that spawn after killing a Thunder.
- **Barn Timer** - Shows the time and amount of sea creatures while fishing on the barn via hub.
- **Shark Fish Counter** - Counts how many sharks have been caught.
+- **Added Odger waypoint** - Show the Odger waypoint when trophy fishes are in the inventory and no lava rod in hand.
## Damage Indicator
- Show the remaining health of selected bosses in the game in a bigger GUI.
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java
index aaca16d2d..af12bb09c 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java
@@ -173,6 +173,7 @@ public class SkyHanniMod {
loadModule(new BarnFishingTimer());
loadModule(new CrimsonIsleReputationHelper(this));
loadModule(new SharkFishCounter());
+ loadModule(new OdgerWaypoint());
Commands.INSTANCE.init();
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Fishing.java b/src/main/java/at/hannibal2/skyhanni/config/features/Fishing.java
index 00fe136eb..325dd1333 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Fishing.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Fishing.java
@@ -31,6 +31,12 @@ public class Fishing {
@ConfigAccordionId(id = 0)
public boolean trophyFishSilverHider = false;
+ @Expose
+ @ConfigOption(name = "Odger Waypoint", desc = "Show the Odger waypoint when trophy fishes are in the inventory and no lava rod in hand.")
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 0)
+ public boolean odgerLocation = true;
+
@ConfigOption(name = "Thunder Spark", desc = "")
@ConfigEditorAccordion(id = 1)
public boolean thunderSpark = false;
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/OdgerWaypoint.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/OdgerWaypoint.kt
new file mode 100644
index 000000000..4af5e0fbe
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/OdgerWaypoint.kt
@@ -0,0 +1,62 @@
+package at.hannibal2.skyhanni.features.fishing
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.IslandType
+import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
+import at.hannibal2.skyhanni.utils.ItemUtils.getLore
+import at.hannibal2.skyhanni.utils.ItemUtils.name
+import at.hannibal2.skyhanni.utils.LorenzColor
+import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzVec
+import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
+import net.minecraft.client.Minecraft
+import net.minecraftforge.client.event.RenderWorldLastEvent
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import net.minecraftforge.fml.common.gameevent.TickEvent
+
+class OdgerWaypoint {
+ private val location = LorenzVec(-373, 207, -808)
+
+ private var tick = 0
+ private var hasLavaRodInHand = false
+ private var trophyFishInInv = false
+
+ @SubscribeEvent
+ fun onTick(event: TickEvent.ClientTickEvent) {
+ if (event.phase != TickEvent.Phase.START) return
+
+ if (!LorenzUtils.inSkyBlock) return
+ if (!SkyHanniMod.feature.fishing.odgerLocation) return
+
+ tick++
+
+ if (tick % 10 == 0) {
+ hasLavaRodInHand = isLavaFishingRod()
+
+ trophyFishInInv = Minecraft.getMinecraft().thePlayer.inventoryContainer.inventorySlots
+ .mapNotNull { it?.stack }
+ .map { it.getLore() }
+ .any { it.last().endsWith("TROPHY FISH") }
+ }
+ }
+
+ private fun isLavaFishingRod(): Boolean {
+ val heldItem = Minecraft.getMinecraft().thePlayer.heldItem ?: return false
+ val isRod = heldItem.name?.contains("Rod") ?: return false
+ if (!isRod) return false
+
+ return heldItem.getLore().any { it.contains("Lava Rod") }
+ }
+
+ @SubscribeEvent
+ fun onRenderWorld(event: RenderWorldLastEvent) {
+ if (!LorenzUtils.inSkyBlock) return
+ if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return
+ if (!SkyHanniMod.feature.fishing.odgerLocation) return
+ if (hasLavaRodInHand) return
+ if (!trophyFishInInv) return
+
+ event.drawWaypointFilled(location, LorenzColor.WHITE.toColor())
+ event.drawDynamicText(location, "Odger", 1.5)
+ }
+} \ No newline at end of file