aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java
index db168747..ccfe4a65 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java
@@ -160,15 +160,19 @@ public class CalendarOverlay {
if(jingleIndex == 0) {
if (NotEnoughUpdates.INSTANCE.manager.config.eventNotificationSounds.value) {
- Minecraft.getMinecraft().thePlayer.playSound("notenoughupdates:calendar_notif_jingle", 1, 1);
- }
- if (NotEnoughUpdates.INSTANCE.manager.config.eventNotificationSounds.value) {
- Minecraft.getMinecraft().thePlayer.playSound("notenoughupdates:calendar_notif_in", 1, 1);
+ Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(
+ new ResourceLocation("notenoughupdates:calendar_notif_jingle")
+ ));
+ Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(
+ new ResourceLocation("notenoughupdates:calendar_notif_in")
+ ));
}
jingleIndex = -15*20;
} else if(jingleIndex >= 1) {
if (NotEnoughUpdates.INSTANCE.manager.config.eventNotificationSounds.value) {
- Minecraft.getMinecraft().thePlayer.playSound("notenoughupdates:calendar_notif_in", 1, 1);
+ Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(
+ new ResourceLocation("notenoughupdates:calendar_notif_in")
+ ));
}
jingleIndex = -15*20;
} else if(jingleIndex < -1) {
@@ -176,7 +180,9 @@ public class CalendarOverlay {
}
if(jingleIndex == -20*6-10) {
if(NotEnoughUpdates.INSTANCE.manager.config.eventNotificationSounds.value) {
- Minecraft.getMinecraft().thePlayer.playSound("notenoughupdates:calendar_notif_out", 1, 1);
+ Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(
+ new ResourceLocation("notenoughupdates:calendar_notif_out")
+ ));
}
}