PaperMC/paper-server/nms-patches/net/minecraft/util/datafix/fixes/DataConverterMap.patch
CraftBukkit/Spigot 9da047989c Repackage NMS
By: md_5 <git@md-5.net>
2021-03-16 09:00:00 +11:00

11 lines
717 B
Diff

--- a/net/minecraft/util/datafix/fixes/DataConverterMap.java
+++ b/net/minecraft/util/datafix/fixes/DataConverterMap.java
@@ -32,7 +32,7 @@
Typed<?> typed1 = typed.getOrCreateTyped(opticfinder1);
Dynamic<?> dynamic1 = (Dynamic) typed1.get(DSL.remainderFinder());
- dynamic1 = dynamic1.set("map", dynamic1.createInt(dynamic.get("Damage").asInt(0)));
+ if (!dynamic1.getElement("map").result().isPresent()) dynamic1 = dynamic1.set("map", dynamic1.createInt(dynamic.get("Damage").asInt(0))); // CraftBukkit
return typed.set(opticfinder1, typed1.set(DSL.remainderFinder(), dynamic1));
} else {
return typed;