-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathUtils.java
More file actions
14 lines (12 loc) · 677 Bytes
/
Copy pathUtils.java
File metadata and controls
14 lines (12 loc) · 677 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package com.bvengo.soundcontroller;
import com.bvengo.soundcontroller.mixin.SoundManagerAccessor;
import com.bvengo.soundcontroller.mixin.SoundSystemAccessor;
import net.minecraft.client.MinecraftClient;
import net.minecraft.sound.SoundCategory;
public class Utils {
public static void updateExistingSounds() {
SoundSystemAccessor soundSystem = (SoundSystemAccessor) ((SoundManagerAccessor) MinecraftClient.getInstance().getSoundManager()).getSoundSystem();
// Trigger updates for all existing sounds. AMBIENT is an arbitrary category - as long as it isn't MASTER, all existing volumes will be updated.
soundSystem.invokeUpdateSoundVolume(SoundCategory.AMBIENT);
}
}