From 8d28f93077995baeafc4496ff6d2d31049ca532e Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 31 May 2022 17:02:07 -0500 Subject: [PATCH] Infinite loop failsafe --- World/SulphurousSea.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/World/SulphurousSea.cs b/World/SulphurousSea.cs index e9941e40b9..fcf2a57ce1 100644 --- a/World/SulphurousSea.cs +++ b/World/SulphurousSea.cs @@ -670,8 +670,14 @@ namespace CalamityMod.World chest = MiscWorldgenRoutines.AddChestWithLoot(x, y, (ushort)ModContent.TileType()); } } + + if (attempts >= 5000) + break; } + if (attempts >= 5000) + continue; + // If a chest was placed, force its first item to be the unique item. if (chest != null) {