Prevent lambda allocation

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-09-15 14:57:17 +02:00
parent 7f463cdf94
commit cffbf47b94

View File

@ -106,13 +106,13 @@ public final class UpdateManager {
*/
private void serverTick(long tickStart) {
// Tick all instances
MinecraftServer.getInstanceManager().getInstances().forEach(instance -> {
for (Instance instance : MinecraftServer.getInstanceManager().getInstances()) {
try {
instance.tick(tickStart);
} catch (Exception e) {
MinecraftServer.getExceptionManager().handleException(e);
}
});
}
// Tick all chunks (and entities inside)
this.threadDispatcher.updateAndAwait(tickStart);