mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Honor client.enableMachineSounds to address https://github.com/NillerMedDild/Enigmatica2Expert/issues/983
This commit is contained in:
1 parent
ae2619c12d
commit
39424224a2
2 files changed
+12
No files matched your search
@@ -3,6 +3,7 @@ package mekanism.common.tile.prefab;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.base.IActiveState;
|
||||
import mekanism.common.config.MekanismConfig;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -49,6 +50,11 @@ public abstract class TileEntityNoisyBlock extends TileEntityElectricBlock imple
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private void updateSound() {
|
||||
// If machine sounds are disabled, noop
|
||||
if (!MekanismConfig.client.enableMachineSounds) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (getActive() && !isInvalid()) {
|
||||
// If sounds are being muted, we can attempt to start them on every tick, only to have them
|
||||
// denied by the event bus, so use a cooldown period that ensures we're only trying once every
|
||||
|
||||
@@ -10,6 +10,7 @@ import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.base.IActiveState;
|
||||
import mekanism.common.base.TileNetworkList;
|
||||
import mekanism.common.config.MekanismConfig;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.TileUtils;
|
||||
@@ -110,6 +111,11 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private void updateSound() {
|
||||
// If machine sounds are disabled, noop
|
||||
if (!MekanismConfig.client.enableMachineSounds) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (getActive() && !isInvalid()) {
|
||||
// If sounds are being muted, we can attempt to start them on every tick, only to have them
|
||||
// denied by the event bus, so use a cooldown period that ensures we're only trying once every
|
||||
|
||||
Reference in new issue
Block a user