diff --git a/common/mekanism/client/render/block/MachineRenderingHandler.java b/common/mekanism/client/render/block/MachineRenderingHandler.java index 38c85f724..512b96479 100644 --- a/common/mekanism/client/render/block/MachineRenderingHandler.java +++ b/common/mekanism/client/render/block/MachineRenderingHandler.java @@ -86,7 +86,7 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler { GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F); - GL11.glTranslatef(0.0F, -1F, 0.05F); + GL11.glTranslatef(0.0F, -1.06F, 0.05F); Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "RotaryCondensentrator.png")); rotaryCondensentrator.render(0.0625F); } diff --git a/common/mekanism/client/sound/Sound.java b/common/mekanism/client/sound/Sound.java index a45a95641..57d1b22a7 100644 --- a/common/mekanism/client/sound/Sound.java +++ b/common/mekanism/client/sound/Sound.java @@ -21,6 +21,8 @@ public abstract class Sound private Object objRef; + protected Minecraft mc = Minecraft.getMinecraft(); + /** * A sound that runs off of the PaulsCode sound system. * @param id - unique identifier @@ -50,7 +52,7 @@ public abstract class Sound if(SoundHandler.getSoundSystem() != null) { SoundHandler.getSoundSystem().newSource(false, id, url, sound, true, (float)loc.x, (float)loc.y, (float)loc.z, 0, 16F); - updateVolume(Minecraft.getMinecraft().thePlayer); + updateVolume(); SoundHandler.getSoundSystem().activate(id); } @@ -72,7 +74,7 @@ public abstract class Sound if(SoundHandler.getSoundSystem() != null) { - updateVolume(Minecraft.getMinecraft().thePlayer); + updateVolume(); SoundHandler.getSoundSystem().play(identifier); } @@ -94,7 +96,7 @@ public abstract class Sound if(SoundHandler.getSoundSystem() != null) { - updateVolume(Minecraft.getMinecraft().thePlayer); + updateVolume(); SoundHandler.getSoundSystem().stop(identifier); } @@ -118,7 +120,7 @@ public abstract class Sound if(SoundHandler.getSoundSystem() != null) { - updateVolume(Minecraft.getMinecraft().thePlayer); + updateVolume(); SoundHandler.getSoundSystem().removeSource(identifier); } } @@ -134,7 +136,7 @@ public abstract class Sound * Updates the volume based on how far away the player is from the machine. * @param entityplayer - player who is near the machine, always Minecraft.thePlayer */ - public void updateVolume(EntityPlayer entityplayer) + public void updateVolume() { synchronized(MekanismClient.audioHandler.sounds) { @@ -143,7 +145,7 @@ public abstract class Sound float volume = 0; float masterVolume = MekanismClient.audioHandler.masterVolume; - double distance = entityplayer.getDistance(getLocation().x, getLocation().y, getLocation().z); + double distance = mc.thePlayer.getDistance(getLocation().x, getLocation().y, getLocation().z); volume = (float)Math.min(Math.max(masterVolume-((distance*.08F)*masterVolume), 0)*multiplier, 1); volume *= Math.max(0, Math.min(1, MekanismClient.baseSoundVolume)); diff --git a/common/mekanism/client/sound/SoundHandler.java b/common/mekanism/client/sound/SoundHandler.java index da39e87f5..8f23a2016 100644 --- a/common/mekanism/client/sound/SoundHandler.java +++ b/common/mekanism/client/sound/SoundHandler.java @@ -193,7 +193,7 @@ public class SoundHandler { if(sound.isPlaying) { - sound.updateVolume(FMLClientHandler.instance().getClient().thePlayer); + sound.updateVolume(); } }