Paper/nms-patches/DataConverterRegistry.patch
2019-04-23 12:00:00 +10:00

22 lines
1.1 KiB
Diff

--- a/net/minecraft/server/DataConverterRegistry.java
+++ b/net/minecraft/server/DataConverterRegistry.java
@@ -183,6 +183,18 @@
datafixerbuilder.addFixer(new DataConverterItemFrame(schema46, false));
Schema schema47 = datafixerbuilder.addSchema(1458, DataConverterRegistry.b);
+ // CraftBukkit start
+ datafixerbuilder.addFixer(new com.mojang.datafixers.DataFix(schema47, 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 DataConverterCustomNameEntity.a(dynamic);
+ });
+ });
+ }
+ });
+ // CraftBukkit end
datafixerbuilder.addFixer(new DataConverterCustomNameEntity(schema47, false));
datafixerbuilder.addFixer(new DataConverterCustomNameItem(schema47, false));
datafixerbuilder.addFixer(new DataConverterCustomNameTile(schema47, false));