Skip to content

Commit

Permalink
Add Wave Pulser sound support
Browse files Browse the repository at this point in the history
  • Loading branch information
Oxyopiia committed Jul 28, 2024
1 parent cb4a63c commit f8af945
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/main/java/net/oxyopia/vice/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,22 @@ public void OPEN_DEV_CONFIG() {
)
public float EIGHT_BIT_KATANA_VOLUME = 1f;

@Property(
type = PropertyType.DECIMAL_SLIDER,
name = "Wave Pulser Volume",
category = "Sounds",
maxF = 2f
)
public float WAVE_PULSER_VOLUME = 1f;

@Property(
type = PropertyType.SWITCH,
name = "Apply to Wave Pulser Volume to Evoker Fangs",
description = "Wether the Evoker Fangs sound is affected by Wave Pulser Volume. Disable if you still want to know how many mobs were hit without getting earraped.",
category = "Sounds"
)
public boolean APPLY_WAVE_PULSER_VOLUME_TO_FANGS = true;

@Property(
type = PropertyType.DECIMAL_SLIDER,
name = "Glitch Mallet Volume",
Expand Down Expand Up @@ -795,6 +811,8 @@ public void init() {
addDependency("LIVE_ARENA_MOBS", "LIVE_ARENA_TOGGLE");
addDependency("LIVE_ARENA_ROUND_TIMER", "LIVE_ARENA_TOGGLE");
addDependency("LIVE_ARENA_DROPS", "LIVE_ARENA_TOGGLE");

addDependency("APPLY_WAVE_PULSER_VOLUME_TO_FANGS", "WAVE_PULSER_VOLUME", (value) -> (float) value != 1f);
}

public @NotNull List<Migration> getMigrations() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object AbilitySoundChanger {
event.setReturnValue(config.SNOWBALL_CANNON_VOLUME)
}

(sound == "entity.snowball.throw" || sound == "entity.generic.explode") && volume == 9999f && ItemAbility.ARCTIC_CORE.remainingCooldown() > 0f -> {
(sound == "entity.snowball.throw" || sound == "entity.generic.explode") && volume == 9999f && ItemAbility.ARCTIC_CORE.isOnCooldown() -> {
event.setReturnValue(config.ARCTIC_CORE_VOLUME)
}

Expand All @@ -46,6 +46,17 @@ object AbilitySoundChanger {
(sound == "entity.illusioner.cast_spell" && ItemAbility.SHADOW_GELATO_DRUM_GUN.isOnCooldown()) -> {
event.setReturnValue(config.SHADOW_DRUM_GUN_VOLUME)
}

volume == 3f && (
sound == "block.beacon.activate" ||
sound == "item.shield.block" ||
sound == "entity.player.hurt_freeze" ||
sound == "entity.elder_guardian.curse" ||
sound == "item.trident.riptide_1" ||
(sound == "entity.evoker_fangs.attack" && config.APPLY_WAVE_PULSER_VOLUME_TO_FANGS)
) && ItemAbility.WAVE_PULSER.remainingCooldown() >= 7f -> {
event.setReturnValue(config.WAVE_PULSER_VOLUME)
}
}
}
}

0 comments on commit f8af945

Please sign in to comment.