Use Codecs for adventure Component conversions & network serialization (#10014)

* finish implementing all adventure components in codecs

* add some initial tests

* Add round trip tests for text and translatable components

* Add more round trip test data (score component is failing)

* Add more round trip test data

* Fix SCORE_COMPONENT_MAP_CODEC

* Improve test failure messages

* Add failure cases

* Add a couple more test data

* Make use of AdventureCodecs

* Update patches after rebase

* Squash changes into adventure patch

* Fix AT formatting

* update comment

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
This commit is contained in:
Jake Potrebic 2023-12-11 22:02:06 -08:00 committed by GitHub
parent 82f9280ae4
commit 7c2dc4b342
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
637 changed files with 965 additions and 421 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary itemmeta handling
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
index 3374ea2fa61e1683c4c4d7ea3ef9b8a20cd09f62..23d78a3193c30dd99d42182628c0e9e4527fc143 100644
index dd542b8b235115c4ce54578120d9bc184e852676..6b566413cd53f84820f0920249037fc9c2c1c4ca 100644
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
@@ -642,7 +642,7 @@ public class FriendlyByteBuf extends ByteBuf {
@@ -645,7 +645,7 @@ public class FriendlyByteBuf extends ByteBuf {
if (item.canBeDepleted() || item.shouldOverrideMultiplayerNbt()) {
// Spigot start - filter
stack = stack.copy();
@ -17,7 +17,7 @@ index 3374ea2fa61e1683c4c4d7ea3ef9b8a20cd09f62..23d78a3193c30dd99d42182628c0e9e4
// Spigot end
nbttagcompound = stack.getTag();
}
@@ -663,7 +663,7 @@ public class FriendlyByteBuf extends ByteBuf {
@@ -666,7 +666,7 @@ public class FriendlyByteBuf extends ByteBuf {
itemstack.setTag(this.readNbt());
// CraftBukkit start