1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-04-13 17:32:45 +02:00

Make advancement ordering predictable ()

This commit is contained in:
Matthew Peters 2025-03-21 16:52:42 +00:00 committed by GitHub
parent f49d18df89
commit 894631f0d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,3 +67,12 @@
}
});
}
@@ -247,7 +_,7 @@
public void flushDirty(ServerPlayer serverPlayer) {
if (this.isFirstPacket || !this.rootsToUpdate.isEmpty() || !this.progressChanged.isEmpty()) {
Map<ResourceLocation, AdvancementProgress> map = new HashMap<>();
- Set<AdvancementHolder> set = new HashSet<>();
+ Set<AdvancementHolder> set = new java.util.TreeSet<>(java.util.Comparator.comparing(adv -> adv.id().toString())); // Paper - Changed from HashSet to TreeSet ordered alphabetically.
Set<ResourceLocation> set1 = new HashSet<>();
for (AdvancementNode advancementNode : this.rootsToUpdate) {