aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rw-r--r--FEATURES.md4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/Storage.java3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Garden.java14
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt70
7 files changed, 98 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 23793afb7..536118f87 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,10 @@
### New Features
+ Added Visitor Drop Counter to track all the drops from visitors.
+ Added **Contest Time Needed** - Show the time and missing FF for every crop inside Jacob's Farming Contest inventory.
++ Added **Garden Start Location**
+ + Show the start waypoint for your farm with the currently holding tool.
+ + Auto-detects the start of the farm when farming for the first time
+ + Option to manually set the waypoint with /shcropstartlocation
### Changes
+ Added Options for displays Crop Milestone and Best Crop Time.
diff --git a/FEATURES.md b/FEATURES.md
index 4764893da..bd5a666c8 100644
--- a/FEATURES.md
+++ b/FEATURES.md
@@ -222,6 +222,10 @@
+ **yaw and pitch display** - Shows yaw and pitch with customizable precision while holding a farm tool. Automatically fades out if there is no movement for a customizable duration (Contributed by Sefer)
+ Warning when 6th visitors is ready (Contributed by CalMWolfs)
+ **Contest Time Needed** - Show the time and missing FF for every crop inside Jacob's Farming Contest inventory.
++ **Garden Start Location**
+ + Show the start waypoint for your farm with the currently holding tool.
+ + Auto-detects the start of the farm when farming for the first time
+ + Option to manually set the waypoint with /shcropstartlocation
## Commands
+ **/wiki <search term>** - using hypixel-skyblock.fandom.com instead of Hypixel wiki.
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
index d31d50325..1a2e27e96 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
@@ -275,6 +275,7 @@ class SkyHanniMod {
loadModule(BingoCardTips())
loadModule(GardenVisitorDropStatistics)
loadModule(SackDisplay())
+ loadModule(GardenStartLocation)
init()
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java
index 797f8d941..9b51acddd 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java
@@ -145,6 +145,9 @@ public class Storage {
@Expose
public Map<VisitorReward, Integer> rewardsCount = new HashMap<>();
}
+
+ @Expose
+ public Map<CropType, LorenzVec> cropStartLocations = new HashMap<>();
}
}
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 b0a43cb05..72abc47ca 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -14,6 +14,7 @@ import at.hannibal2.skyhanni.features.garden.GardenCropTimeCommand
import at.hannibal2.skyhanni.features.garden.composter.ComposterOverlay
import at.hannibal2.skyhanni.features.garden.farming.CropMoneyDisplay
import at.hannibal2.skyhanni.features.garden.farming.CropSpeedMeter
+import at.hannibal2.skyhanni.features.garden.farming.GardenStartLocation
import at.hannibal2.skyhanni.features.minion.MinionFeatures
import at.hannibal2.skyhanni.features.misc.CollectionCounter
import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager
@@ -54,6 +55,7 @@ object Commands {
registerCommand("shcroptime") { GardenCropTimeCommand.onCommand(it) }
registerCommand("shshareinquis") { InquisitorWaypointShare.sendInquisitor() }
registerCommand("shrpcstart") { DiscordRPCManager.startCommand() }
+ registerCommand("shcropstartlocation") { GardenStartLocation.setLocationCommand() }
// for users - fix bugs
registerCommand("shupdaterepo") { SkyHanniMod.repo.updateRepo() }
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 ff5febe26..b20b04e96 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java
@@ -1122,6 +1122,20 @@ public class Garden {
}
@Expose
+ @ConfigOption(name = "Crop Start Location", desc = "")
+ @Accordion
+ public CropStartLocation cropStartLocation = new CropStartLocation();
+
+ public static class CropStartLocation {
+
+ @Expose
+ @ConfigOption(name = "Enable", desc = "Show the start waypoint for your farm with the currently holding tool.")
+ @ConfigEditorBoolean
+ public boolean enabled = false;
+
+ }
+
+ @Expose
@ConfigOption(name = "Plot Price", desc = "Show the price of the plot in coins when inside the Configure Plots inventory.")
@ConfigEditorBoolean
public boolean plotPrice = true;
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt
new file mode 100644
index 000000000..2d02fa941
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt
@@ -0,0 +1,70 @@
+package at.hannibal2.skyhanni.features.garden.farming
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.events.CropClickEvent
+import at.hannibal2.skyhanni.features.garden.GardenAPI
+import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
+import at.hannibal2.skyhanni.utils.LocationUtils
+import at.hannibal2.skyhanni.utils.LorenzColor
+import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
+import net.minecraftforge.client.event.RenderWorldLastEvent
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+
+object GardenStartLocation {
+
+ fun setLocationCommand() {
+ if (!GardenAPI.inGarden()) {
+ LorenzUtils.chat("§c[SkyHanni] This Command only works in the garden!")
+ return
+ }
+ if (!SkyHanniMod.feature.garden.cropStartLocation.enabled) {
+ LorenzUtils.clickableChat(
+ "§c[SkyHanni] This feature is disabled. Enable it in the config: §e/sh crop start location",
+ "sh crop start location"
+ )
+ return
+ }
+
+ val startLocations = GardenAPI.config?.cropStartLocations
+ if (startLocations == null) {
+ LorenzUtils.chat("§c[SkyHanni] The config is not yet loaded, retry in a second.")
+ return
+ }
+
+ val crop = GardenAPI.getCurrentlyFarmedCrop()
+ if (crop == null) {
+ LorenzUtils.chat("§c[SkyHanni] Hold a crop specific farming tool in the hand!")
+ return
+ }
+
+ startLocations[crop] = LocationUtils.playerLocation()
+ LorenzUtils.chat("§e[SkyHanni] You changed your Crop Start Location for ${crop.cropName}!")
+ }
+
+ @SubscribeEvent
+ fun onBlockClick(event: CropClickEvent) {
+ if (!isEnabled()) return
+ val startLocations = GardenAPI.config?.cropStartLocations ?: return
+ val crop = GardenAPI.getCurrentlyFarmedCrop() ?: return
+ if (crop != GardenCropSpeed.lastBrokenCrop) return
+
+ if (!startLocations.contains(crop)) {
+ startLocations[crop] = LocationUtils.playerLocation()
+ LorenzUtils.chat("§e[SkyHanni] Auto updated your Crop Start Location for ${crop.cropName}")
+ }
+ }
+
+ @SubscribeEvent
+ fun onRenderWorld(event: RenderWorldLastEvent) {
+ if (!isEnabled()) return
+ val startLocations = GardenAPI.config?.cropStartLocations ?: return
+ val crop = GardenAPI.cropInHand ?: return
+ val location = startLocations[crop] ?: return
+
+ event.drawWaypointFilled(location, LorenzColor.WHITE.toColor())
+ event.drawDynamicText(location, crop.cropName, 1.5)
+ }
+
+ fun isEnabled() = GardenAPI.inGarden() && SkyHanniMod.feature.garden.cropStartLocation.enabled
+}