diff --git a/AriasServerUtils/RTPFactory.cs b/AriasServerUtils/RTPFactory.cs index ad91bff..3f200a6 100644 --- a/AriasServerUtils/RTPFactory.cs +++ b/AriasServerUtils/RTPFactory.cs @@ -28,13 +28,15 @@ public class RTPFactory while (tries-- > 0) { - // Generate random X and Z within max RTP distance - bPos.X = (int)vPos.X + rng.Next(0, maxDistance); - bPos.Z = (int)vPos.Z + rng.Next(0, maxDistance); - bPos.Y = 255; + int ixMax = (int)vPos.X + maxDistance; + int ixMin = (int)vPos.X - maxDistance; + int izMax = (int)vPos.Z + maxDistance; + int izMin = (int)vPos.Z - maxDistance; - if (rng.Next(0, 1) == 1) bPos.X = -bPos.X; - if (rng.Next(0, 1) == 1) bPos.Z = -bPos.Z; + // Generate random X and Z within max RTP distance + bPos.X = (int)vPos.X + rng.Next(ixMin, ixMax); + bPos.Z = (int)vPos.Z + rng.Next(izMin, izMax); + bPos.Y = 255; Block lastAboveLast = null; Block lastBlock = null; diff --git a/AriasServerUtils/modinfo.json b/AriasServerUtils/modinfo.json index b5af4c0..4626e83 100644 --- a/AriasServerUtils/modinfo.json +++ b/AriasServerUtils/modinfo.json @@ -3,8 +3,8 @@ "modid": "ariasserverutils", "name": "Aria's Server Utilities", "authors": ["zontreck"], - "description": "A collection of server utilities\n\nBuild Date: 03-07-2025 @ 12:09 PM MST", - "version": "1.0.6-dev.5", + "description": "A collection of server utilities\n\nBuild Date: 03-07-2025 @ 12:20 PM MST", + "version": "1.0.6-dev.6", "dependencies": { "game": "" }