diff options
author | Ovi-111 <142670705+Ovi-111@users.noreply.github.com> | 2024-09-08 01:00:55 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-07 21:00:55 +0200 |
commit | 2d2ba2a02f542d288e142cf3a626dc81cb163006 (patch) | |
tree | ee1ba401b227f0122382a3edc0eb5ce416fa9398 /src/main/java/at/hannibal2/skyhanni/config | |
parent | f40863a821218938b8f53f17a4441ad5c973d0e3 (diff) | |
download | skyhanni-2d2ba2a02f542d288e142cf3a626dc81cb163006.tar.gz skyhanni-2d2ba2a02f542d288e142cf3a626dc81cb163006.tar.bz2 skyhanni-2d2ba2a02f542d288e142cf3a626dc81cb163006.zip |
Feature: Dungeon Secret Chime (#2478)
Co-authored-by: Ovi <ovi2561@gmail.com>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java | 5 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/dungeon/SecretChimeConfig.java | 40 |
2 files changed, 45 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java index 60809f44f..ec2bc0c4b 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java @@ -16,6 +16,11 @@ public class DungeonConfig { public HighlightClickedBlocksConfig clickedBlocks = new HighlightClickedBlocksConfig(); @Expose + @ConfigOption(name = "Secret Chime", desc = "Play a sound effect when levers, chests, and wither essence are clicked in dungeons.") + @Accordion + public SecretChimeConfig secretChime = new SecretChimeConfig(); + + @Expose @ConfigOption(name = "Milestones Display", desc = "Show the current milestone in Dungeons.") @ConfigEditorBoolean @FeatureToggle diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/SecretChimeConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/SecretChimeConfig.java new file mode 100644 index 000000000..99a1e103d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/SecretChimeConfig.java @@ -0,0 +1,40 @@ +package at.hannibal2.skyhanni.config.features.dungeon; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.features.dungeon.DungeonSecretChime; +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; + +public class SecretChimeConfig { + @Expose + @ConfigOption(name = "Enabled", desc = "Play a sound effect when levers, chests, and wither essence are clicked in dungeons.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Secret Chime Sound", desc = "The sound played for the secret chime.") + @ConfigEditorText + public String soundName = "random.orb"; + + @Expose + @ConfigOption(name = "Pitch", desc = "The pitch of the secret chime sound.") + @ConfigEditorSlider(minValue = 0.5f, maxValue = 2.0f, minStep = 0.1f) + public float soundPitch = 1.0f; + + @ConfigOption(name = "Sounds", + desc = "Click to open the list of available sounds.\n" + + "§l§cWarning: Clicking this will open a webpage in your browser." + ) + @ConfigEditorButton(buttonText = "OPEN") + public Runnable soundsListURL = () -> OSUtils.openBrowser("https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/mapping-and-modding-tutorials/2213619-1-8-all-playsound-sound-arguments"); + + @ConfigOption(name = "Play Sound", desc = "Plays current secret chime sound.") + @ConfigEditorButton(buttonText = "Play") + public Runnable checkSound = DungeonSecretChime::playSound; +} |