mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Remaster sounds to all be -30dBFS; remove per-object sound volume; honor config setting for volume adjustment
This commit is contained in:
1 parent
5dd3cf3bbd
commit
a392514e16
39 files changed
+9
-40
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package mekanism.client.sound;
|
||||
|
||||
import mekanism.common.config.MekanismConfig.client;
|
||||
import net.minecraft.client.audio.ITickableSound;
|
||||
import net.minecraft.client.audio.PositionedSound;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -71,4 +72,9 @@ public abstract class PlayerSound extends PositionedSound implements ITickableSo
|
||||
}
|
||||
|
||||
public abstract boolean shouldPlaySound();
|
||||
|
||||
@Override
|
||||
public float getVolume() {
|
||||
return super.getVolume() * client.baseSoundVolume;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import javax.annotation.Nullable;
|
||||
import mekanism.common.Upgrade;
|
||||
import mekanism.common.base.IUpgradeTile;
|
||||
import mekanism.common.config.MekanismConfig;
|
||||
import mekanism.common.config.MekanismConfig.client;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.audio.ITickableSound;
|
||||
@@ -84,7 +85,8 @@ public class SoundHandler {
|
||||
ISound s = soundMap.get(pos.toLong());
|
||||
if (s == null || !Minecraft.getMinecraft().getSoundHandler().isSoundPlaying(s)) {
|
||||
// No sound playing, start one up - we assume that tile sounds will play until explicitly stopped
|
||||
s = new PositionedSoundRecord(soundLoc, SoundCategory.BLOCKS, volume, 1.0f,
|
||||
s = new PositionedSoundRecord(soundLoc, SoundCategory.BLOCKS,
|
||||
volume * client.baseSoundVolume, 1.0f,
|
||||
true, 0, ISound.AttenuationType.LINEAR,
|
||||
pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f);
|
||||
|
||||
|
||||
@@ -169,11 +169,6 @@ public class TileEntityChargepad extends TileEntityEffectsBlock {
|
||||
return side != 0 && side != 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getInitialVolume() {
|
||||
return 0.4F * super.getInitialVolume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderUpdate() {
|
||||
return false;
|
||||
|
||||
@@ -20,10 +20,4 @@ public class TileEntityCrusher extends TileEntityElectricMachine<CrusherRecipe>
|
||||
public Map<ItemStackInput, CrusherRecipe> getRecipes() {
|
||||
return Recipe.CRUSHER.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInitialVolume() {
|
||||
return 0.5F * super.getInitialVolume();
|
||||
}
|
||||
}
|
||||
@@ -21,10 +21,4 @@ public class TileEntityEnrichmentChamber extends TileEntityElectricMachine<Enric
|
||||
public Map<ItemStackInput, EnrichmentRecipe> getRecipes() {
|
||||
return Recipe.ENRICHMENT_CHAMBER.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInitialVolume() {
|
||||
return 0.3F * super.getInitialVolume();
|
||||
}
|
||||
}
|
||||
@@ -22,10 +22,4 @@ public class TileEntityPrecisionSawmill extends TileEntityChanceMachine<SawmillR
|
||||
public Map<ItemStackInput, SawmillRecipe> getRecipes() {
|
||||
return Recipe.PRECISION_SAWMILL.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInitialVolume() {
|
||||
return 0.7F * super.getInitialVolume();
|
||||
}
|
||||
}
|
||||
@@ -125,11 +125,6 @@ public class TileEntityResistiveHeater extends TileEntityEffectsBlock implements
|
||||
return side != 0 && side != 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInitialVolume() {
|
||||
return super.getInitialVolume() * Math.max(0.001F, soundScale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbtTags) {
|
||||
super.readFromNBT(nbtTags);
|
||||
|
||||
@@ -43,12 +43,6 @@ public class TileEntitySolarGenerator extends TileEntityGenerator {
|
||||
return new int[]{0};
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInitialVolume() {
|
||||
return 0.05F * super.getInitialVolume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSetFacing(int facing) {
|
||||
return facing != 0 && facing != 1;
|
||||
|
||||
@@ -111,11 +111,6 @@ public class TileEntityWindGenerator extends TileEntityGenerator implements IBou
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getInitialVolume() {
|
||||
return 1.5F * super.getInitialVolume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getMethods() {
|
||||
return methods;
|
||||
|
||||
Reference in new issue
Block a user