From fdf8a967ef8f20fbcf347fe0a164bea356de38ec Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Tue, 1 Aug 2023 16:13:34 -0600 Subject: [PATCH] Mushroom shrine no longer generates too close to the center of the world in Gfb --- World/UndergroundShrines.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/World/UndergroundShrines.cs b/World/UndergroundShrines.cs index 8dc4ef1db6..579c3b4198 100644 --- a/World/UndergroundShrines.cs +++ b/World/UndergroundShrines.cs @@ -499,8 +499,18 @@ namespace CalamityMod.World { int placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.2f), (int)(Main.maxTilesX * 0.8f)); int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.2f), (int)(Main.maxTilesY * 0.85f)); + + // Gfb if (Main.getGoodWorld) + { + // Ensure that the shrine doesn't generate too close to the center of the world + do + { + placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.2f), (int)(Main.maxTilesX * 0.8f)); + } + while (placementPositionX > (int)(Main.maxTilesX * 0.4f) && placementPositionX < (int)(Main.maxTilesX * 0.6f)); placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.8f), (int)(Main.maxTilesY * 0.85f)); //Mushroom layer + } Point placementPoint = new Point(placementPositionX, placementPositionY);