diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt | 48 |
2 files changed, 0 insertions, 54 deletions
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 @@ -159,12 +159,6 @@ public class GardenConfig { 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", desc = "Show the minimum needed Farming Fortune for reaching each medal in Jacob's Farming Contest inventory." 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) - } - } -} |