From 9ab5e746ca0e0b6626307826ce8f567fa230dad2 Mon Sep 17 00:00:00 2001 From: TheMode Date: Wed, 15 Sep 2021 15:30:24 +0200 Subject: [PATCH] Prevent another lambda allocation Signed-off-by: TheMode --- src/main/java/net/minestom/server/UpdateManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/UpdateManager.java b/src/main/java/net/minestom/server/UpdateManager.java index 62cfa25c6..3cad9a0ca 100644 --- a/src/main/java/net/minestom/server/UpdateManager.java +++ b/src/main/java/net/minestom/server/UpdateManager.java @@ -77,7 +77,9 @@ public final class UpdateManager { final double acquisitionTimeMs = Acquirable.getAcquiringTime() / 1e6D; final double tickTimeMs = tickTime / 1e6D; final TickMonitor tickMonitor = new TickMonitor(tickTimeMs, acquisitionTimeMs); - this.tickMonitors.forEach(consumer -> consumer.accept(tickMonitor)); + for (Consumer consumer : tickMonitors) { + consumer.accept(tickMonitor); + } Acquirable.resetAcquiringTime(); }