From a1a903e3a3d223d2654ad941070a552c57fb6642 Mon Sep 17 00:00:00 2001 From: MTOnline69 <97001154+MTOnline69@users.noreply.github.com> Date: Tue, 17 Sep 2024 08:40:31 +0100 Subject: Removed Feature: Wild Strawberry Dye notification (#2520) --- .../config/features/garden/GardenConfig.java | 6 --- .../farming/WildStrawberryDyeNotification.kt | 48 ---------------------- 2 files changed, 54 deletions(-) delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java index b39f5f01c..8aa9aa6a1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java @@ -158,12 +158,6 @@ public class GardenConfig { @FeatureToggle public boolean burrowingSporesNotification = true; - @Expose - @ConfigOption(name = "Wild Strawberry", desc = "Show a notification when a Wild Strawberry Dye drops while farming.") - @ConfigEditorBoolean - @FeatureToggle - public boolean wildStrawberryDyeNotification = true; - @Expose @ConfigOption( name = "FF for Contest", diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt deleted file mode 100644 index 34b4191d4..000000000 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt +++ /dev/null @@ -1,48 +0,0 @@ -package at.hannibal2.skyhanni.features.garden.farming - -import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent -import at.hannibal2.skyhanni.features.garden.GardenAPI -import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule -import at.hannibal2.skyhanni.utils.ChatUtils -import at.hannibal2.skyhanni.utils.ItemBlink -import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName -import at.hannibal2.skyhanni.utils.ItemUtils.name -import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName -import at.hannibal2.skyhanni.utils.SimpleTimeMark -import at.hannibal2.skyhanni.utils.SoundUtils -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import kotlin.time.Duration.Companion.seconds - -@SkyHanniModule -object WildStrawberryDyeNotification { - - private var lastCloseTime = SimpleTimeMark.farPast() - - val item by lazy { "DYE_WILD_STRAWBERRY".asInternalName() } - - @SubscribeEvent - fun onInventoryClose(event: InventoryCloseEvent) { - lastCloseTime = SimpleTimeMark.now() - } - - @SubscribeEvent - fun onOwnInventoryItemUpdate(event: OwnInventoryItemUpdateEvent) { - if (!GardenAPI.inGarden()) return - if (!GardenAPI.config.wildStrawberryDyeNotification) return - // Prevent false positives when buying the item in ah or moving it from a storage - if (lastCloseTime.passedSince() < 1.seconds) return - - val itemStack = event.itemStack - - val internalName = itemStack.getInternalName() - if (internalName == item) { - val name = itemStack.name - LorenzUtils.sendTitle(name, 5.seconds) - ChatUtils.chat("You found a $name§e!") - SoundUtils.playBeepSound() - ItemBlink.setBlink(itemStack, 5_000) - } - } -} -- cgit