mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-26 23:13:07 +00:00
20 lines
494 B
Scala
20 lines
494 B
Scala
package codechicken.multipart
|
|
|
|
/** Interface for parts with random update ticks. Used in conjuction with
|
|
* TickScheduler
|
|
*/
|
|
trait TRandomUpdateTick extends TMultiPart {
|
|
|
|
/** Called on random update. Random ticks are between 800 and 1600 ticks from
|
|
* their last scheduled/random tick
|
|
*/
|
|
def randomUpdate()
|
|
|
|
/** If implementing interface in java, be sure to implement this method
|
|
* yourself
|
|
*/
|
|
override def onWorldJoin() {
|
|
TickScheduler.loadRandomTick(this)
|
|
}
|
|
}
|