Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-14 18:40:10 +01:00
fix adventure patch
Dieser Commit ist enthalten in:
Ursprung
9188180d7a
Commit
a9f38a8789
23
patches/removed/1.17/0012-Adventure.patch
Normale Datei
23
patches/removed/1.17/0012-Adventure.patch
Normale Datei
@ -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);
|
||||
}
|
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren