From 9501e7619fb9094ffad84e4050a747314c175f4f Mon Sep 17 00:00:00 2001 From: Jake Potrebic <15055071+Machine-Maker@users.noreply.github.com> Date: Tue, 15 Jun 2021 16:41:38 -0700 Subject: [PATCH] added remaining hunks from chat/title packets (#5844) --- patches/removed/1.17/0012-Adventure.patch | 23 ----- .../0049-Player-Tab-List-and-Title-APIs.patch | 31 ------- .../0051-Player-Tab-List-and-Title-APIs.patch | 31 ------- patches/server/0010-Adventure.patch | 92 +++++++++++++++++-- .../0048-Player-Tab-List-and-Title-APIs.patch | 56 +++++++++-- ...ble-inter-world-teleportation-safety.patch | 4 +- .../0057-Complete-resource-pack-API.patch | 6 +- ...th-absorb-values-and-repair-bad-data.patch | 4 +- ...nd-for-setting-passengers-on-players.patch | 4 +- ...86-Implement-PlayerLocaleChangeEvent.patch | 6 +- .../0121-String-based-Action-Bar-API.patch | 29 +++++- ...0-Ability-to-apply-mending-to-XP-API.patch | 4 +- .../0185-Player.setPlayerProfile-API.patch | 8 +- ...90-Flag-to-disable-the-channel-limit.patch | 4 +- .../0219-InventoryCloseEvent-Reason-API.patch | 10 +- ...e-attack-cooldown-methods-for-Player.patch | 4 +- .../server/0262-Improve-death-events.patch | 6 +- ...-replace-OfflinePlayer-getLastPlayed.patch | 8 +- ...-remove-from-being-called-on-Players.patch | 4 +- ...-Implement-Player-Client-Options-API.patch | 4 +- ...k-Priority-Urgency-System-for-Chunks.patch | 4 +- patches/server/0499-Brand-support.patch | 4 +- .../server/0535-Player-elytra-boost-API.patch | 4 +- ...r-spawnParticle-x-y-z-precision-loss.patch | 4 +- patches/server/0592-Add-sendOpLevel-API.patch | 4 +- .../server/0620-Expose-Tracked-Players.patch | 4 +- ...ditions-to-PlayerGameModeChangeEvent.patch | 4 +- .../0688-Add-PlayerKickEvent-causes.patch | 4 +- 28 files changed, 212 insertions(+), 158 deletions(-) delete mode 100644 patches/removed/1.17/0012-Adventure.patch delete mode 100644 patches/removed/1.17/0049-Player-Tab-List-and-Title-APIs.patch delete mode 100644 patches/removed/1.17/0051-Player-Tab-List-and-Title-APIs.patch diff --git a/patches/removed/1.17/0012-Adventure.patch b/patches/removed/1.17/0012-Adventure.patch deleted file mode 100644 index d0d6c9d6b6..0000000000 --- a/patches/removed/1.17/0012-Adventure.patch +++ /dev/null @@ -1,23 +0,0 @@ -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 915120cc505c70153f7b70f07d8d42c13eb77ea7..69ff8df7340e60c476803256750a48f0b43414d3 100644 ---- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java -+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java -@@ -10,6 +10,7 @@ public class ClientboundSetTitlesPacket implements Packet { - } - - } -+ // Paper start -+ public net.md_5.bungee.api.chat.BaseComponent[] components; -+ -+ public PacketPlayOutTitle(EnumTitleAction action, net.md_5.bungee.api.chat.BaseComponent[] components, int fadeIn, int stay, int fadeOut) { -+ this.a = action; -+ this.components = components; -+ this.c = fadeIn; -+ this.d = stay; -+ this.e = fadeOut; -+ } -+ // Paper end - - @Override - public void b(PacketDataSerializer packetdataserializer) throws IOException { -@@ -55,6 +66,8 @@ public class PacketPlayOutTitle implements Packet { - // Paper start - if (this.adventure$text != null) { - packetdataserializer.writeComponent(this.adventure$text); -+ } else if (this.components != null) { -+ packetdataserializer.writeComponent(this.components); - } else - // Paper end - packetdataserializer.a(this.b); diff --git a/patches/removed/1.17/0051-Player-Tab-List-and-Title-APIs.patch b/patches/removed/1.17/0051-Player-Tab-List-and-Title-APIs.patch deleted file mode 100644 index 3ad1a77c63..0000000000 --- a/patches/removed/1.17/0051-Player-Tab-List-and-Title-APIs.patch +++ /dev/null @@ -1,31 +0,0 @@ -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 { + private final Component text; ++ public net.kyori.adventure.text.Component adventure$text; // Paper + + public ClientboundSetActionBarTextPacket(Component message) { + this.text = message; +@@ -17,6 +18,11 @@ 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; +@@ -17,6 +18,11 @@ 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; +@@ -17,6 +18,11 @@ 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; +@@ -21,6 +22,8 @@ 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; +@@ -21,6 +22,8 @@ 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; +@@ -21,6 +22,8 @@ public class ClientboundSetActionBarTextPacket implements Packet