mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-22 13:10:13 +00:00
Fix machine active state blinking in between successive tasks
This commit is contained in:
1 parent
5b39d3f234
commit
6215e39410
3 files changed
+7
-7
No files matched your search
@@ -212,11 +212,15 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
|
||||
public float getPitch() {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
protected boolean shouldPlaySound() {
|
||||
return isActive() && !isInvalid();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private void updateSound() {
|
||||
if(Config.machineSoundsEnabled && hasSound()) {
|
||||
if(isActive() && !isInvalid()) {
|
||||
if(shouldPlaySound()) {
|
||||
if(sound == null) {
|
||||
sound = new MachineSound(soundRes, xCoord + 0.5f, yCoord + 0.5f, zCoord + 0.5f, getVolume(), getPitch());
|
||||
FMLClientHandler.instance().getClient().getSoundHandler().playSound(sound);
|
||||
|
||||
Reference in new issue
Block a user