3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00
Paper/nms-patches/Advancement.patch

29 Zeilen
1.7 KiB
Diff

2017-05-14 04:00:00 +02:00
--- a/net/minecraft/server/Advancement.java
+++ b/net/minecraft/server/Advancement.java
2018-07-15 02:00:00 +02:00
@@ -27,6 +27,7 @@
2017-05-14 04:00:00 +02:00
private final String[][] f;
private final Set<Advancement> g = Sets.newLinkedHashSet();
private final IChatBaseComponent h;
+ public final org.bukkit.advancement.Advancement bukkit = new org.bukkit.craftbukkit.advancement.CraftAdvancement(this); // CraftBukkit
public Advancement(MinecraftKey minecraftkey, @Nullable Advancement advancement, @Nullable AdvancementDisplay advancementdisplay, AdvancementRewards advancementrewards, Map<String, Criterion> map, String[][] astring) {
this.d = minecraftkey;
@@ -46,7 +47,7 @@
EnumChatFormat enumchatformat = advancementdisplay.e().c();
2018-08-26 04:00:00 +02:00
IChatBaseComponent ichatbasecomponent1 = ichatbasecomponent.h().a(enumchatformat).a("\n").addSibling(advancementdisplay.b());
IChatBaseComponent ichatbasecomponent2 = ichatbasecomponent.h().a((chatmodifier) -> {
- chatmodifier.setChatHoverable(new ChatHoverable(ChatHoverable.EnumHoverAction.SHOW_TEXT, ichatbasecomponent));
+ chatmodifier.setChatHoverable(new ChatHoverable(ChatHoverable.EnumHoverAction.SHOW_TEXT, ichatbasecomponent1)); // CraftBukkit - decompile error
});
this.h = (new ChatComponentText("[")).addSibling(ichatbasecomponent2).a("]").a(enumchatformat);
2018-07-15 02:00:00 +02:00
@@ -206,7 +207,7 @@
}
public Advancement b(MinecraftKey minecraftkey) {
- if (!this.a((minecraftkey) -> {
+ if (!this.a((Function<MinecraftKey, Advancement>) (minecraftkey1) -> { // CraftBukkit - decompile error
return null;
})) {
throw new IllegalStateException("Tried to build incomplete advancement!");