31 lines
1.5 KiB
Diff
31 lines
1.5 KiB
Diff
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
|
|
index 69ff8df7340e60c476803256750a48f0b43414d3..df444daeb181ff78170f7b92bd02f1f1862dfa2e 100644
|
|
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
|
|
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
|
|
@@ -47,6 +47,17 @@ public class ClientboundSetTitlesPacket implements Packet<ClientGamePacketListen
|
|
}
|
|
|
|
}
|
|
+ // Paper start
|
|
+ public net.md_5.bungee.api.chat.BaseComponent[] components;
|
|
+
|
|
+ public ClientboundSetTitlesPacket(Type action, net.md_5.bungee.api.chat.BaseComponent[] components, int fadeIn, int stay, int fadeOut) {
|
|
+ this.type = action;
|
|
+ this.components = components;
|
|
+ this.fadeInTime = fadeIn;
|
|
+ this.stayTime = stay;
|
|
+ this.fadeOutTime = fadeOut;
|
|
+ }
|
|
+ // Paper end
|
|
|
|
@Override
|
|
public void write(FriendlyByteBuf buf) throws IOException {
|
|
@@ -55,6 +66,8 @@ public class ClientboundSetTitlesPacket implements Packet<ClientGamePacketListen
|
|
// Paper start
|
|
if (this.adventure$text != null) {
|
|
buf.writeComponent(this.adventure$text);
|
|
+ } else if (this.components != null) {
|
|
+ buf.writeComponent(this.components);
|
|
} else
|
|
// Paper end
|
|
buf.writeComponent(this.text);
|