From 6e75bd6dc33b23507e952267015628ba542715b9 Mon Sep 17 00:00:00 2001 From: HiZe Date: Sat, 1 Jun 2024 11:19:31 +0200 Subject: Improvement + Fix: Sound for special stray rabbit (#1913) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../chocolatefactory/ChocolateFactoryConfig.java | 10 +++--- .../ChocolateFactoryRabbitWarningConfig.java | 41 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryRabbitWarningConfig.java (limited to 'src/main/java/at/hannibal2/skyhanni/config/features') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java index f954015ac..50230a6ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java @@ -70,11 +70,6 @@ public class ChocolateFactoryConfig { @ConfigEditorBoolean public boolean useMiddleClick = true; - @Expose - @ConfigOption(name = "Rabbit Warning", desc = "Warn when the rabbit that needs to be clicked appears.") - @ConfigEditorBoolean - public boolean rabbitWarning = true; - @Expose @ConfigOption( name = "Rabbit Crush Threshold", @@ -185,6 +180,11 @@ public class ChocolateFactoryConfig { @FeatureToggle public boolean onlyHighlightRequirementNotMet = true; + @Expose + @ConfigOption(name = "Rabbit Warning", desc = "") + @Accordion + public ChocolateFactoryRabbitWarningConfig rabbitWarning = new ChocolateFactoryRabbitWarningConfig(); + @Expose @ConfigOption(name = "Chocolate Shop Price", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryRabbitWarningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryRabbitWarningConfig.java new file mode 100644 index 000000000..ef39d5f6c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryRabbitWarningConfig.java @@ -0,0 +1,41 @@ +package at.hannibal2.skyhanni.config.features.inventory.chocolatefactory; + +import at.hannibal2.skyhanni.utils.OSUtils; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorButton; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorText; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; +import io.github.notenoughupdates.moulconfig.observer.Property; + +public class ChocolateFactoryRabbitWarningConfig { + + @Expose + @ConfigOption(name = "Rabbit Warning", desc = "Warn when the rabbit that needs to be clicked appears.") + @ConfigEditorBoolean + public boolean rabbitWarning = true; + + @Expose + @ConfigOption(name = "Special Rabbit Warning", desc = "Warn when a special rabbit that needs to be clicked appears. (Rabbit The Fish and Golden Rabbits.") + @ConfigEditorBoolean + public boolean specialRabbitWarning = true; + + @Expose + @ConfigOption(name = "Warning Sound", desc = "The sound that play for a special rabbit.\n" + + "§eYou can use custom sounds, put it in the skyhanni/sounds folder in your resource pack.\n" + + "§eThen write skyhanni:yourfilename\n" + + "§cMust be a .ogg file") + @ConfigEditorText + public Property specialRabbitSound = Property.of("note.pling"); + + @Expose + @ConfigOption(name = "Repeat Sound", desc = "How many times the sound should be repeated.") + @ConfigEditorSlider(minValue = 1, maxValue = 20, minStep = 1) + public int repeatSound = 20; + + @ConfigOption(name = "Sounds", desc = "Click to open the list of available sounds.") + @ConfigEditorButton(buttonText = "OPEN") + public Runnable sounds = () -> OSUtils.openBrowser("https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/mapping-and-modding-tutorials/2213619-1-8-all-playsound-sound-arguments"); + +} -- cgit