diff options
Diffstat (limited to 'src/main/java/at/hannibal2')
3 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java index 50cb1fa0f..cb276b7ce 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java @@ -274,6 +274,7 @@ public class SkyHanniMod { loadModule(new GardenTeleportPadInventoryNumber()); loadModule(new ComposterOverlay()); loadModule(new GardenCropMilestoneFix()); + loadModule(new GardenBurrowingSporesNotifier()); Commands.INSTANCE.init(); 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 07e97edaf..b6bb30838 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java @@ -970,6 +970,12 @@ public class Garden { @ConfigEditorBoolean public boolean fungiCutterWarn = true; + + @Expose + @ConfigOption(name = "Burrowing Spores", desc = "Show a notification when a Burrowing Spores spawns during farming mushrooms.") + @ConfigEditorBoolean + public boolean burrowingSporesNotification = true; + @Expose @ConfigOption(name = "Always Finnegan", desc = "Forcefully set the Finnegan Farming Simulator perk to be active. This is useful if the auto mayor detection fails.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt new file mode 100644 index 000000000..0d91abe60 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt @@ -0,0 +1,20 @@ +package at.hannibal2.skyhanni.features.garden.farming + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.data.TitleUtils +import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.features.garden.GardenAPI +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class GardenBurrowingSporesNotifier { + + @SubscribeEvent + fun onChat(event: LorenzChatEvent) { + if (!GardenAPI.inGarden()) return + if (!SkyHanniMod.feature.garden.burrowingSporesNotification) return + + if (event.message.endsWith("§6§lVERY RARE CROP! §r§f§r§9Burrowing Spores")) { + TitleUtils.sendTitle("§9Burrowing Spores!", 5_000) + } + } +}
\ No newline at end of file |