Provide ComponentSerializer services (#7527)

This commit is contained in:
Jake Potrebic
2022-05-26 12:12:14 -07:00
parent 75a1da666c
commit a093b95db2
21 changed files with 448 additions and 254 deletions

View File

@@ -19,6 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+import io.papermc.paper.adventure.PaperAdventure;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
+import net.minecraft.world.Container;
+import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.item.ItemStack;
@@ -55,7 +56,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ adventure$title = type.defaultTitle();
+ }
+ this.adventure$title = adventure$title;
+ this.title = PaperAdventure.LEGACY_SECTION_UXRC.serialize(this.adventure$title);
+ this.title = LegacyComponentSerializer.legacySection().serialize(this.adventure$title);
+ }
+
+ public Component title() {