Closed jinjee89 closed 5 months ago
@jinjee89 Thanks for filing this issue! I have released a new version (1.1.1) which uses DateTime.now().microsecond for the seed and then keeps the Random() generator around so future seeds are never required anyway. This way 16 .nextInt() would have to repeat the previous 16 to get an identical key, which should probably never occur with a good random generator.
math.Random random = math.Random(DateTime.now().millisecond);
When generating a random key, millisecond is used as the seed of the random function as shown above, which causes duplicate keys to be generated. When quickly creating multiple cursors using a for statement, there is a problem that the same random seed is used and they end up having the same keys.