aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/util/datafix/DataFixers.java.patch
blob: c9f3a2ae6720a0bdd81cba1ad35d6c197bf165bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/net/minecraft/util/datafix/DataFixers.java
+++ b/net/minecraft/util/datafix/DataFixers.java
@@ -442,7 +277,20 @@
         builder.addFixer(new VillagerTradeFix(schema43, false));
         Schema schema44 = builder.addSchema(1456, SAME_NAMESPACED);
         builder.addFixer(new EntityItemFrameDirectionFix(schema44, false));
-        Schema schema45 = builder.addSchema(1458, SAME_NAMESPACED);
+        Schema schema45 = builder.addSchema(1458, DataFixers.SAME_NAMESPACED);
+
+        // CraftBukkit start
+        builder.addFixer(new com.mojang.datafixers.DataFix(schema45, false) {
+            @Override
+            protected com.mojang.datafixers.TypeRewriteRule makeRule() {
+                return this.fixTypeEverywhereTyped("Player CustomName", this.getInputSchema().getType(DataConverterTypes.PLAYER), (typed) -> {
+                    return typed.update(DSL.remainderFinder(), (dynamic) -> {
+                        return EntityCustomNameToComponentFix.fixTagCustomName(dynamic);
+                    });
+                });
+            }
+        });
+        // CraftBukkit end
         builder.addFixer(new EntityCustomNameToComponentFix(schema45, false));
         builder.addFixer(new ItemCustomNameToComponentFix(schema45, false));
         builder.addFixer(new BlockEntityCustomNameToComponentFix(schema45, false));