PaperMC/paper-server/patches/sources/net/minecraft/network/chat/MutableComponent.java.patch
2024-12-14 18:44:19 +01:00

14 lines
639 B
Diff

--- a/net/minecraft/network/chat/MutableComponent.java
+++ b/net/minecraft/network/chat/MutableComponent.java
@@ -94,6 +_,11 @@
@Override
public boolean equals(Object other) {
+ // Paper start - make AdventureComponent equivalent
+ if (other instanceof io.papermc.paper.adventure.AdventureComponent adventureComponent) {
+ other = adventureComponent.deepConverted();
+ }
+ // Paper end - make AdventureComponent equivalent
return this == other
|| other instanceof MutableComponent mutableComponent
&& this.contents.equals(mutableComponent.contents)