1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-03-14 15:38:13 +00:00

Functional change Lignum suggested

This commit is contained in:
Wojbie 2017-07-29 01:14:36 +02:00
parent 225ec594e7
commit acb5f65e16
2 changed files with 3 additions and 3 deletions

View File

@ -55,9 +55,9 @@ public class SpeakerPeripheral implements IPeripheral {
return m_speaker.getPos();
}
public synchronized boolean madeSound()
public synchronized boolean madeSound(long ticks)
{
return (m_clock - m_lastPlayTime <= 20) ;
return (m_clock - m_lastPlayTime <= ticks) ;
}
/* IPeripheral implementation */

View File

@ -75,7 +75,7 @@ public class PocketSpeaker implements IPocketUpgrade
speaker.setLocation( entity.getEntityWorld(), entity.posX, entity.posY, entity.posZ );
}
speaker.update();
access.setLight( speaker.madeSound() ? 0x3320fc : -1 );
access.setLight( speaker.madeSound(20) ? 0x3320fc : -1 );
}
}