Changes pitch for working sound
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
This commit is contained in:
parent
384893b01a
commit
523e4cb47a
@ -171,14 +171,14 @@ public abstract class Session implements Runnable {
|
||||
* @param sound <p>The sound to play</p>
|
||||
*/
|
||||
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 <p>The entity that should play the sound</p>
|
||||
* @param sound <p>The sound to play</p>
|
||||
* @param pitch <p>The pitch to play the sound at</p>
|
||||
*/
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user