summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-10-15 19:21:35 +1100
committermd_5 <git@md-5.net>2018-10-15 19:21:35 +1100
commit0adc1b9989216c97b36642780d777a6adb63d20c (patch)
tree95322e6dc9624e09ec3d267a44a5d76ddf655f40 /nms-patches
parente3d7b2fd9657de5ed1a18a375c028adbce4288cb (diff)
downloadcraftbukkit-0adc1b9989216c97b36642780d777a6adb63d20c.tar
craftbukkit-0adc1b9989216c97b36642780d777a6adb63d20c.tar.gz
craftbukkit-0adc1b9989216c97b36642780d777a6adb63d20c.tar.lz
craftbukkit-0adc1b9989216c97b36642780d777a6adb63d20c.tar.xz
craftbukkit-0adc1b9989216c97b36642780d777a6adb63d20c.zip
SPIGOT-4428: Update Player CustomName
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/DataConverterRegistry.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/nms-patches/DataConverterRegistry.patch b/nms-patches/DataConverterRegistry.patch
new file mode 100644
index 00000000..b2981bc2
--- /dev/null
+++ b/nms-patches/DataConverterRegistry.patch
@@ -0,0 +1,21 @@
+--- a/net/minecraft/server/DataConverterRegistry.java
++++ b/net/minecraft/server/DataConverterRegistry.java
+@@ -195,6 +195,18 @@
+ datafixerbuilder.addFixer(new DataConverterItemFrame(schema46, false));
+ Schema schema47 = datafixerbuilder.addSchema(1458, DataConverterRegistry.c);
+
++ // 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.b), (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));