From 523e4cb47a33f21354953d04dd602ef6e8fb2db8 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Sun, 28 Jul 2024 17:20:51 +0200 Subject: [PATCH] Changes pitch for working sound --- .../java/net/knarcraft/blacksmith/trait/Session.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/knarcraft/blacksmith/trait/Session.java b/src/main/java/net/knarcraft/blacksmith/trait/Session.java index 9e0714e..2b053fa 100644 --- a/src/main/java/net/knarcraft/blacksmith/trait/Session.java +++ b/src/main/java/net/knarcraft/blacksmith/trait/Session.java @@ -171,14 +171,14 @@ public abstract class Session implements Runnable { * @param sound

The sound to play

*/ protected void playSound(Sound sound) { - playSound(this.npc.getEntity(), sound, 1.0F); + playSound(this.npc.getEntity(), sound); } /** * Plays the working NPC sound */ protected void playWorkSound() { - playSound(this.npc.getEntity(), Sound.ITEM_ARMOR_EQUIP_NETHERITE, 0.5f); + playSound(this.npc.getEntity(), Sound.ITEM_ARMOR_EQUIP_NETHERITE); } /** @@ -186,15 +186,14 @@ public abstract class Session implements Runnable { * * @param entity

The entity that should play the sound

* @param sound

The sound to play

- * @param pitch

The pitch to play the sound at

*/ - private void playSound(@NotNull Entity entity, @NotNull Sound sound, float pitch) { + private void playSound(@NotNull Entity entity, @NotNull Sound sound) { World world = entity.getLocation().getWorld(); if (world == null) { return; } - NPCSoundEvent event = new NPCSoundEvent(this.npc, this.player, SoundCategory.AMBIENT, sound, 0.5f, pitch); + NPCSoundEvent event = new NPCSoundEvent(this.npc, this.player, SoundCategory.AMBIENT, sound, 0.5f, 1.0f); BlacksmithPlugin.getInstance().callEvent(event); if (event.isCancelled()) { return;