mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
eed041d629
By: md_5 <git@md-5.net>
28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
--- a/net/minecraft/server/AdvancementDataWorld.java
|
|
+++ b/net/minecraft/server/AdvancementDataWorld.java
|
|
@@ -27,11 +27,15 @@
|
|
import net.minecraft.util.profiling.GameProfilerFiller;
|
|
import org.slf4j.Logger;
|
|
|
|
+// CraftBukkit start
|
|
+import java.util.HashMap;
|
|
+// CraftBukkit end
|
|
+
|
|
public class AdvancementDataWorld extends ResourceDataJson {
|
|
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
public static final Gson GSON = (new GsonBuilder()).create();
|
|
- 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;
|
|
|
|
@@ -55,7 +59,7 @@
|
|
}
|
|
|
|
});
|
|
- this.advancements = builder.buildOrThrow();
|
|
+ this.advancements = new HashMap<>(builder.buildOrThrow()); // CraftBukkit - SPIGOT-7734: mutable
|
|
AdvancementTree advancementtree = new AdvancementTree();
|
|
|
|
advancementtree.addAll(this.advancements.values());
|