--- 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 advancements = Map.of(); + public Map 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());