diff options
| author | BuildTools <james.jenour@protonmail.com> | 2020-12-31 01:26:26 +0800 |
|---|---|---|
| committer | BuildTools <james.jenour@protonmail.com> | 2020-12-31 01:26:26 +0800 |
| commit | 9ae63509ab33c4d3f0ee19bc618ef4e4c654ef46 (patch) | |
| tree | b5d9120c9211ec989c05f0fb7d02d6497e49f8d0 /src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java | |
| parent | 38bfc81ad013925463cd382bf99807d15b4fc53e (diff) | |
| download | notenoughupdates-9ae63509ab33c4d3f0ee19bc618ef4e4c654ef46.tar.gz notenoughupdates-9ae63509ab33c4d3f0ee19bc618ef4e4c654ef46.tar.bz2 notenoughupdates-9ae63509ab33c4d3f0ee19bc618ef4e4c654ef46.zip | |
1.8-PRE1
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java | 18 |
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") + )); } } |
