[ci skip] Add more identifying patch comments, merge related patches

This commit is contained in:
Nassim Jahnke
2024-01-19 12:30:04 +01:00
parent 864f4072c1
commit b5b92e90d8
38 changed files with 181 additions and 229 deletions

View File

@@ -91,7 +91,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private final boolean hidden;
private float x;
private float y;
+ public final io.papermc.paper.advancement.AdvancementDisplay paper = new io.papermc.paper.advancement.PaperAdvancementDisplay(this); // Paper
+ public final io.papermc.paper.advancement.AdvancementDisplay paper = new io.papermc.paper.advancement.PaperAdvancementDisplay(this); // Paper - Add more advancement API
public DisplayInfo(ItemStack icon, Component title, Component description, Optional<ResourceLocation> background, AdvancementType frame, boolean showToast, boolean announceToChat, boolean hidden) {
this.title = title;
@@ -103,7 +103,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return Collections.unmodifiableCollection(this.handle.value().criteria().keySet());
}
+ // Paper start
+ // Paper start - Add more advancement API
@Override
- public AdvancementDisplay getDisplay() {
- if (this.handle.value().display().isEmpty()) {
@@ -149,7 +149,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ final net.minecraft.advancements.AdvancementNode advancementNode = net.minecraft.server.MinecraftServer.getServer().getAdvancements().tree().get(this.handle);
+ return java.util.Objects.requireNonNull(advancementNode, "could not find internal advancement node for advancement " + this.handle.id()).root().holder().toBukkit();
}
+ // Paper end
+ // Paper end - Add more advancement API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644