Fixes rng to use a seed

This commit is contained in:
zontreck 2025-03-07 12:27:07 -07:00
parent 2f1ac319de
commit 70fe822b0a
3 changed files with 4 additions and 3 deletions

View file

@ -27,6 +27,7 @@ namespace AriasServerUtils
internal static BackCaches backCaches = new BackCaches();
internal static Warps serverWarps = new Warps();
internal static Random rng = new Random((int)TimeUtil.GetUnixEpochTimestamp());
internal static string[] saveInvTypes = new string[] {

View file

@ -18,7 +18,7 @@ public class RTPFactory
/// <returns>A random position +/- max distance from current position.</returns>
public static PlayerPosition GetRandomPosition(IServerPlayer isp, int maxDistance)
{
Random rng = new Random();
Random rng = ServerUtilities.rng;
EntityPos vPos = isp.Entity.Pos;
BlockPos bPos = new BlockPos(isp.Entity.Pos.Dimension);
IServerWorldAccessor iswa = isp.Entity.World as IServerWorldAccessor;

View file

@ -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:20 PM MST",
"version": "1.0.6-dev.6",
"description": "A collection of server utilities\n\nBuild Date: 03-07-2025 @ 12:25 PM MST",
"version": "1.0.6-dev.7",
"dependencies": {
"game": ""
}