Fix vanilla components not being translated (#9893)

* Fix vanilla components not being translated

* Add nullability check, simplify adventure component encoding

Changes suggested by @jpenilla
This commit is contained in:
booky10
2023-12-12 22:40:33 +01:00
parent ebf7955996
commit 480f2aab54
2 changed files with 40 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
@@ -0,0 +0,0 @@ public class FriendlyByteBuf extends ByteBuf {
return this.writeWithCodec(NbtOps.INSTANCE, ComponentSerialization.CODEC, text);
return this.writeWithCodec(NbtOps.INSTANCE, ComponentSerialization.localizedCodec(this.adventure$locale), text);
// Paper end - adventure
}
+ // Paper start - deprecated Tab List & Title APIs