From ca8a47f9e81817b4e6abf0d8ecde747a04c311bc Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Tue, 15 Jun 2021 16:41:38 -0700 Subject: [PATCH] added remaining hunks from chat/title packets (#5844) --- patches/server/Adventure.patch | 90 +++++++++++++++++-- .../Player-Tab-List-and-Title-APIs.patch | 52 ++++++++++- .../server/String-based-Action-Bar-API.patch | 25 +++++- 3 files changed, 153 insertions(+), 14 deletions(-) diff --git a/patches/server/Adventure.patch b/patches/server/Adventure.patch index 79ab74caed..2f2832e535 100644 --- a/patches/server/Adventure.patch +++ b/patches/server/Adventure.patch @@ -1110,6 +1110,78 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // Spigot start if (this.components != null) { buf.writeUtf(net.md_5.bungee.chat.ComponentSerializer.toString(components)); +diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java ++++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetActionBarTextPacket.java +@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.Packet; + + public class ClientboundSetActionBarTextPacket implements Packet { + private final Component text; ++ public net.kyori.adventure.text.Component adventure$text; // Paper + + public ClientboundSetActionBarTextPacket(Component message) { + this.text = message; +@@ -0,0 +0,0 @@ public class ClientboundSetActionBarTextPacket implements Packet { + private final Component text; ++ public net.kyori.adventure.text.Component adventure$text; // Paper + + public ClientboundSetSubtitleTextPacket(Component subtitle) { + this.text = subtitle; +@@ -0,0 +0,0 @@ public class ClientboundSetSubtitleTextPacket implements Packet { + private final Component text; ++ public net.kyori.adventure.text.Component adventure$text; // Paper + + public ClientboundSetTitleTextPacket(Component title) { + this.text = title; +@@ -0,0 +0,0 @@ public class ClientboundSetTitleTextPacket implements Packet { + private final Component text; + public net.kyori.adventure.text.Component adventure$text; // Paper ++ public net.md_5.bungee.api.chat.BaseComponent[] components; // Paper + + public ClientboundSetSubtitleTextPacket(Component subtitle) { + this.text = subtitle; +@@ -0,0 +0,0 @@ public class ClientboundSetSubtitleTextPacket implements Packet { + private final Component text; + public net.kyori.adventure.text.Component adventure$text; // Paper ++ public net.md_5.bungee.api.chat.BaseComponent[] components; // Paper + + public ClientboundSetTitleTextPacket(Component title) { + this.text = title; +@@ -0,0 +0,0 @@ public class ClientboundSetTitleTextPacket implements Packet { + private final Component text; + public net.kyori.adventure.text.Component adventure$text; // Paper ++ public net.md_5.bungee.api.chat.BaseComponent[] components; // Paper + + public ClientboundSetActionBarTextPacket(Component message) { + this.text = message; +@@ -0,0 +0,0 @@ public class ClientboundSetActionBarTextPacket implements Packet