Skip to content

Commit 87b7612

Browse files
committed
Play potion sounds at player
Fixes #10
1 parent 961b099 commit 87b7612

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/main/java/mod/acgaming/extrasounds/config/ESConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public static class SoundToggles
120120
public boolean esBeaconSound = true;
121121

122122
@Config.Name("Potion Sound")
123-
@Config.Comment("Play a sound when potion effects get added or removed from an entity")
123+
@Config.Comment("Play a sound when potion effects get added or removed from the player")
124124
public boolean esPotionSound = true;
125125
}
126126

src/main/java/mod/acgaming/extrasounds/mixin/EntityPlayerMixin.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ public void onNewPotionEffect(PotionEffect id)
4545
{
4646
if (id.getPotion().isBadEffect())
4747
{
48-
ESSoundManager.playSoundWorld(ESSoundEvents.effect_add_negative, this.getPosition());
49-
ESSoundManager.playSoundWorld(ESSoundEvents.effect_add_negative, this.getPosition());
48+
ESSoundManager.playSoundPlayer(ESSoundEvents.effect_add_negative);
49+
ESSoundManager.playSoundPlayer(ESSoundEvents.effect_add_negative);
5050
}
5151
else
5252
{
53-
ESSoundManager.playSoundWorld(ESSoundEvents.effect_add_positive, this.getPosition());
54-
ESSoundManager.playSoundWorld(ESSoundEvents.effect_add_positive, this.getPosition());
53+
ESSoundManager.playSoundPlayer(ESSoundEvents.effect_add_positive);
54+
ESSoundManager.playSoundPlayer(ESSoundEvents.effect_add_positive);
5555
}
5656
}
5757
}
@@ -64,13 +64,13 @@ public void onFinishedPotionEffect(PotionEffect effect)
6464
{
6565
if (effect.getPotion().isBadEffect())
6666
{
67-
ESSoundManager.playSoundWorld(ESSoundEvents.effect_remove_negative, this.getPosition());
68-
ESSoundManager.playSoundWorld(ESSoundEvents.effect_remove_negative, this.getPosition());
67+
ESSoundManager.playSoundPlayer(ESSoundEvents.effect_remove_negative);
68+
ESSoundManager.playSoundPlayer(ESSoundEvents.effect_remove_negative);
6969
}
7070
else
7171
{
72-
ESSoundManager.playSoundWorld(ESSoundEvents.effect_remove_positive, this.getPosition());
73-
ESSoundManager.playSoundWorld(ESSoundEvents.effect_remove_positive, this.getPosition());
72+
ESSoundManager.playSoundPlayer(ESSoundEvents.effect_remove_positive);
73+
ESSoundManager.playSoundPlayer(ESSoundEvents.effect_remove_positive);
7474
}
7575
}
7676
}

0 commit comments

Comments
 (0)