mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2024-11-21 22:26:17 +00:00
28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
--- a/net/minecraft/server/AdvancementDataWorld.java
|
|
+++ b/net/minecraft/server/AdvancementDataWorld.java
|
|
@@ -21,10 +21,14 @@
|
|
import net.minecraft.util.profiling.GameProfilerFiller;
|
|
import org.slf4j.Logger;
|
|
|
|
+// CraftBukkit start
|
|
+import java.util.HashMap;
|
|
+// CraftBukkit end
|
|
+
|
|
public class AdvancementDataWorld extends ResourceDataJson<Advancement> {
|
|
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
- public Map<MinecraftKey, AdvancementHolder> advancements = Map.of();
|
|
+ public Map<MinecraftKey, AdvancementHolder> advancements = new HashMap<>(); // CraftBukkit - SPIGOT-7734: mutable
|
|
private AdvancementTree tree = new AdvancementTree();
|
|
private final HolderLookup.a registries;
|
|
|
|
@@ -40,7 +44,7 @@
|
|
this.validate(minecraftkey, advancement);
|
|
builder.put(minecraftkey, new AdvancementHolder(minecraftkey, advancement));
|
|
});
|
|
- this.advancements = builder.buildOrThrow();
|
|
+ this.advancements = new HashMap<>(builder.buildOrThrow()); // CraftBukkit - SPIGOT-7734: mutable
|
|
AdvancementTree advancementtree = new AdvancementTree();
|
|
|
|
advancementtree.addAll(this.advancements.values());
|