geforkt von Mirrors/Paper
fix UnsafeValues#loadAdvancement doesn't recalculate position (#9846)
Dieser Commit ist enthalten in:
Ursprung
f48bd30f89
Commit
1dcda2491e
@ -22,7 +22,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ mapBuilder.put(minecraftkey, holder);
|
||||
+
|
||||
+ MinecraftServer.getServer().getAdvancements().advancements = mapBuilder.build();
|
||||
+ MinecraftServer.getServer().getAdvancements().tree().addAll(List.of(holder));
|
||||
+ final net.minecraft.advancements.AdvancementTree tree = MinecraftServer.getServer().getAdvancements().tree();
|
||||
+ tree.addAll(List.of(holder));
|
||||
+
|
||||
+ // recalculate advancement position
|
||||
+ final net.minecraft.advancements.AdvancementNode node = tree.get(minecraftkey);
|
||||
+ if (node != null) {
|
||||
+ final net.minecraft.advancements.AdvancementNode root = node.root();
|
||||
+ if (root.holder().value().display().isPresent()) {
|
||||
+ net.minecraft.advancements.TreeNodePosition.run(root);
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end - Fix throw UnsupportedOperationException
|
||||
Advancement bukkit = Bukkit.getAdvancement(key);
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren