mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-29 11:59:24 +00:00
29 lines
1.4 KiB
Diff
29 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|
Date: Mon, 9 Oct 2023 21:33:08 -0400
|
|
Subject: [PATCH] Faster Random for xaeroMapServerID generation
|
|
|
|
|
|
diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
|
|
index c73a2f9c3286ecdf57d6cab5c130f69540741a56..2b9e07b9e6e4f4d4e8b3e52192a983c2ad59abbf 100644
|
|
--- a/src/main/java/org/dreeam/leaf/LeafConfig.java
|
|
+++ b/src/main/java/org/dreeam/leaf/LeafConfig.java
|
|
@@ -2,7 +2,7 @@ package org.dreeam.leaf;
|
|
|
|
import com.google.common.collect.ImmutableMap;
|
|
import net.minecraft.core.registries.BuiltInRegistries;
|
|
-import java.util.Random;
|
|
+import java.util.concurrent.ThreadLocalRandom;
|
|
import net.minecraft.server.MinecraftServer;
|
|
import net.minecraft.world.entity.EntityType;
|
|
import org.bukkit.configuration.ConfigurationSection;
|
|
@@ -289,7 +289,7 @@ public class LeafConfig {
|
|
public static boolean jadeProtocol = false;
|
|
public static boolean appleskinProtocol = false;
|
|
public static boolean xaeroMapProtocol = false;
|
|
- public static int xaeroMapServerID = new Random().nextInt();
|
|
+ public static int xaeroMapServerID = ThreadLocalRandom.current().nextInt(); // Leaf - Faster Random
|
|
public static boolean syncmaticaProtocol = false;
|
|
public static boolean syncmaticaQuota = false;
|
|
public static int syncmaticaQuotaLimit = 40000000;
|