mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-24 01:19:25 +00:00
* backport: 1.21.8 async mob spawn * Move into patch * fix * fix build --------- Co-authored-by: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Co-authored-by: hayanesuru <hayanesuru@outlook.jp>
20 lines
1.4 KiB
Diff
20 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Taiyou06 <kaandindar21@gmail.com>
|
|
Date: Sun, 10 Nov 2024 14:36:18 +0100
|
|
Subject: [PATCH] Replace world map with optimized collection
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index eacc39145d22b9afac773623497f8b18836914e8..d0d2ceb45218e6eec14ac9963bf816ff17053af8 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -286,7 +286,7 @@ public final class CraftServer implements Server {
|
|
private final StructureManager structureManager;
|
|
protected final DedicatedServer console;
|
|
protected final DedicatedPlayerList playerList;
|
|
- private final Map<String, World> worlds = new LinkedHashMap<String, World>();
|
|
+ private final Map<String, World> worlds = new it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<String, World>(); // Leaf - Replace world map with optimized collection
|
|
private final it.unimi.dsi.fastutil.objects.Object2ObjectMap<UUID, World> worldsByUUID = new it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap<>(); // Gale - MultiPaper - CraftBukkit UUID to world map
|
|
// private final Map<Class<?>, Registry<?>> registries = new HashMap<>(); // Paper - replace with RegistryAccess
|
|
private YamlConfiguration configuration;
|