fix exact choice recipes

This commit is contained in:
Jake Potrebic 2024-04-26 15:25:20 -07:00
parent 6ba0e1048f
commit f673d54842

View File

@ -547,6 +547,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public Component adventure$component() {
+ return this.adventure;
+ }
+
+ @Override
+ public int hashCode() {
+ return this.deepConverted().hashCode();
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ return this.deepConverted().equals(obj);
+ }
+}
diff --git a/src/main/java/io/papermc/paper/adventure/BossBarImplementationImpl.java b/src/main/java/io/papermc/paper/adventure/BossBarImplementationImpl.java
new file mode 100644
@ -2408,6 +2418,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public static final Codec<MessageSignature> CODEC = ExtraCodecs.BASE64_STRING.xmap(MessageSignature::new, MessageSignature::bytes);
public static final int BYTES = 256;
diff --git a/src/main/java/net/minecraft/network/chat/MutableComponent.java b/src/main/java/net/minecraft/network/chat/MutableComponent.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/network/chat/MutableComponent.java
+++ b/src/main/java/net/minecraft/network/chat/MutableComponent.java
@@ -0,0 +0,0 @@ public class MutableComponent implements Component {
@Override
public boolean equals(Object object) {
+ // Paper start - make AdventureComponent equivalent
+ if (object instanceof io.papermc.paper.adventure.AdventureComponent adventureComponent) {
+ object = adventureComponent.deepConverted();
+ }
+ // Paper end - make AdventureComponent equivalent
return this == object
|| object instanceof MutableComponent mutableComponent
&& this.contents.equals(mutableComponent.contents)
diff --git a/src/main/java/net/minecraft/network/chat/OutgoingChatMessage.java b/src/main/java/net/minecraft/network/chat/OutgoingChatMessage.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/network/chat/OutgoingChatMessage.java