mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-10-25 20:22:25 +00:00
Added a way to manually run ServerTickExecutionContext
This commit is contained in:
1 parent
a530c66680
commit
f8bb1e8fbb
1 file changed
+4
-2
@@ -40,8 +40,7 @@ object ServerTickExecutionContext extends ExecutionContext {
|
||||
override def reportFailure(cause: Throwable): Unit =
|
||||
BdLib.logErrorException("Error in execution context", cause)
|
||||
|
||||
@SubscribeEvent
|
||||
def onTick(ev: ServerTickEvent): Unit = {
|
||||
def doSingleLoop(): Unit = {
|
||||
for (r <- getNextBatch) {
|
||||
try {
|
||||
r.run()
|
||||
@@ -50,4 +49,7 @@ object ServerTickExecutionContext extends ExecutionContext {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
def onTick(ev: ServerTickEvent): Unit = doSingleLoop()
|
||||
}
|
||||
Reference in new issue
Block a user