From 7d4b3bc1aa4d93126c8d0ec6e87461b6d5d5ad23 Mon Sep 17 00:00:00 2001 From: Raycoms Date: Mon, 9 Sep 2024 13:52:36 +0200 Subject: [PATCH] resilience fix --- .../com/minecolonies/core/colony/ColonyManager.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minecolonies/core/colony/ColonyManager.java b/src/main/java/com/minecolonies/core/colony/ColonyManager.java index 033e112adce..acc95bb3374 100755 --- a/src/main/java/com/minecolonies/core/colony/ColonyManager.java +++ b/src/main/java/com/minecolonies/core/colony/ColonyManager.java @@ -636,7 +636,17 @@ public void onWorldTick(final @NotNull LevelTickEvent.Pre event) { if (!event.getLevel().isClientSide) { - getColonies(event.getLevel()).forEach(c -> c.onWorldTick(event)); + for (final IColony colony : getColonies(event.getLevel())) + { + try + { + colony.onWorldTick(event); + } + catch (final Exception ex) + { + Log.getLogger().error("Something went wrong ticking colony: " + colony.getID(), ex); + } + } } }