PaperMC/paper-server/patches/sources/net/minecraft/network/chat/ComponentUtils.java.patch
Riley Park 66779f5c86 Adventure
== AT ==
public net.minecraft.network.chat.HoverEvent$ItemStackInfo item
public net.minecraft.network.chat.HoverEvent$ItemStackInfo count
public net.minecraft.network.chat.HoverEvent$ItemStackInfo components
public net.minecraft.network.chat.contents.TranslatableContents filterAllowedArguments(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;

Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-01-29 17:54:03 +01:00

14 lines
688 B
Diff

--- 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()) {