PaperMC/paper-server/patches/sources/net/minecraft/network/chat/ComponentUtils.java.patch

15 lines
688 B
Diff
Raw Normal View History

--- a/net/minecraft/network/chat/ComponentUtils.java
+++ b/net/minecraft/network/chat/ComponentUtils.java
@@ -41,6 +41,11 @@
if (depth > 100) {
return text.copy();
} else {
+ // Paper start - adventure; pass actual vanilla component
+ if (text instanceof io.papermc.paper.adventure.AdventureComponent adventureComponent) {
+ text = adventureComponent.deepConverted();
+ }
+ // Paper end - adventure; pass actual vanilla component
MutableComponent mutableComponent = text.getContents().resolve(source, sender, depth + 1);
for (Component component : text.getSiblings()) {