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) { private void serverTick(long tickStart) {
// Tick all instances // Tick all instances
MinecraftServer.getInstanceManager().getInstances().forEach(instance -> { for (Instance instance : MinecraftServer.getInstanceManager().getInstances()) {
try { try {
instance.tick(tickStart); instance.tick(tickStart);
} catch (Exception e) { } catch (Exception e) {
MinecraftServer.getExceptionManager().handleException(e); MinecraftServer.getExceptionManager().handleException(e);
} }
}); }
// Tick all chunks (and entities inside) // Tick all chunks (and entities inside)
this.threadDispatcher.updateAndAwait(tickStart); this.threadDispatcher.updateAndAwait(tickStart);