fix adventure patch
This commit is contained in:
parent
9188180d7a
commit
a9f38a8789
3 changed files with 360 additions and 411 deletions
23
patches/removed/1.17/0012-Adventure.patch
Normal file
23
patches/removed/1.17/0012-Adventure.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
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<ClientGamePacketListen
|
||||
|
||||
private ClientboundSetTitlesPacket.Type type;
|
||||
private Component text;
|
||||
+ public net.kyori.adventure.text.Component adventure$text; // Paper
|
||||
private int fadeInTime;
|
||||
private int stayTime;
|
||||
private int fadeOutTime;
|
||||
@@ -51,6 +52,11 @@ public class ClientboundSetTitlesPacket implements Packet<ClientGamePacketListen
|
||||
public void write(FriendlyByteBuf buf) throws IOException {
|
||||
buf.writeEnum((Enum) this.type);
|
||||
if (this.type == ClientboundSetTitlesPacket.Type.TITLE || this.type == ClientboundSetTitlesPacket.Type.SUBTITLE || this.type == ClientboundSetTitlesPacket.Type.ACTIONBAR) {
|
||||
+ // Paper start
|
||||
+ if (this.adventure$text != null) {
|
||||
+ buf.writeComponent(this.adventure$text);
|
||||
+ } else
|
||||
+ // Paper end
|
||||
buf.writeComponent(this.text);
|
||||
}
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue