mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-06 15:51:31 +00:00
Add back pufferfish async mob spawning
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
|
||||
index 1ae8d17c20c1ce661139e4caf348592caef3d81e..46ba1542dad0259f8b823a9dbc99190e2385eb31 100644
|
||||
--- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
|
||||
+++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
|
||||
@@ -3,7 +3,7 @@ package org.dreeam.leaf.config.modules.network;
|
||||
import org.dreeam.leaf.config.ConfigModules;
|
||||
import org.dreeam.leaf.config.EnumConfigCategory;
|
||||
|
||||
-import java.util.Random;
|
||||
+import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class ProtocolSupport extends ConfigModules {
|
||||
|
||||
@@ -16,7 +16,7 @@ public class ProtocolSupport extends ConfigModules {
|
||||
public static boolean asteorBarProtocol = false;
|
||||
public static boolean chatImageProtocol = false;
|
||||
public static boolean xaeroMapProtocol = false;
|
||||
- public static int xaeroMapServerID = new Random().nextInt();
|
||||
+ public static int xaeroMapServerID = ThreadLocalRandom.current().nextInt(); // Leaf - Faster Random
|
||||
|
||||
@Override
|
||||
public void onLoaded() {
|
||||
Reference in New Issue
Block a user