mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-05-07 18:04:15 +00:00
Functional change Lignum suggested
This commit is contained in:
parent
225ec594e7
commit
acb5f65e16
@ -55,9 +55,9 @@ public class SpeakerPeripheral implements IPeripheral {
|
|||||||
return m_speaker.getPos();
|
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 */
|
/* IPeripheral implementation */
|
||||||
|
@ -75,7 +75,7 @@ public class PocketSpeaker implements IPocketUpgrade
|
|||||||
speaker.setLocation( entity.getEntityWorld(), entity.posX, entity.posY, entity.posZ );
|
speaker.setLocation( entity.getEntityWorld(), entity.posX, entity.posY, entity.posZ );
|
||||||
}
|
}
|
||||||
speaker.update();
|
speaker.update();
|
||||||
access.setLight( speaker.madeSound() ? 0x3320fc : -1 );
|
access.setLight( speaker.madeSound(20) ? 0x3320fc : -1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user