diff options
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/advancements/AdvancementHolder.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower/net/minecraft/advancements/AdvancementHolder.java.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/advancements/AdvancementHolder.java.patch b/patch-remap/mache-spigotflower/net/minecraft/advancements/AdvancementHolder.java.patch new file mode 100644 index 0000000000..d743aa95ea --- /dev/null +++ b/patch-remap/mache-spigotflower/net/minecraft/advancements/AdvancementHolder.java.patch @@ -0,0 +1,51 @@ +--- a/net/minecraft/advancements/AdvancementHolder.java ++++ b/net/minecraft/advancements/AdvancementHolder.java +@@ -2,19 +2,22 @@ + + import net.minecraft.network.FriendlyByteBuf; + import net.minecraft.resources.ResourceLocation; ++// CraftBukkit start ++import org.bukkit.craftbukkit.advancement.CraftAdvancement; ++import org.bukkit.craftbukkit.util.CraftNamespacedKey; ++// CraftBukkit end + + public record AdvancementHolder(ResourceLocation id, Advancement value) { + +- public void write(FriendlyByteBuf friendlybytebuf) { +- friendlybytebuf.writeResourceLocation(this.id); +- this.value.write(friendlybytebuf); ++ public void write(FriendlyByteBuf packetdataserializer) { ++ packetdataserializer.writeResourceLocation(this.id); ++ this.value.write(packetdataserializer); + } + +- public static AdvancementHolder read(FriendlyByteBuf friendlybytebuf) { +- return new AdvancementHolder(friendlybytebuf.readResourceLocation(), Advancement.read(friendlybytebuf)); ++ public static AdvancementHolder read(FriendlyByteBuf packetdataserializer) { ++ return new AdvancementHolder(packetdataserializer.readResourceLocation(), Advancement.read(packetdataserializer)); + } + +- @Override + public boolean equals(Object object) { + if (this == object) { + return true; +@@ -35,13 +38,17 @@ + } + } + +- @Override + public int hashCode() { + return this.id.hashCode(); + } + +- @Override + public String toString() { + return this.id.toString(); + } ++ ++ // CraftBukkit start ++ public final org.bukkit.advancement.Advancement toBukkit() { ++ return new CraftAdvancement(this); ++ } ++ // CraftBukkit end + } |