mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-16 15:45:21 +01:00
Prevent lambda allocation
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
7f463cdf94
commit
cffbf47b94
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user