diff options
-rw-r--r-- | patches/server/0987-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/patches/server/0987-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/patches/server/0987-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index ccc8786fd8..30dde1fadd 100644 --- a/patches/server/0987-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/patches/server/0987-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -44,7 +44,7 @@ index d0b51d96d6795b5fa03bc195b90324680545b752..09bcbc0ae36e4e69fee87a7e0c49acf4 return entityitem; } diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -index a43544704109f21bab230dd9bf0401e28f878582..17f33c83c6033564d6bf4fbd388b0b847c68adb3 100644 +index a43544704109f21bab230dd9bf0401e28f878582..6794466051dd4b725d579b2136c37844995a648e 100644 --- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java @@ -79,6 +79,7 @@ public class MapItemSavedData extends SavedData { @@ -71,6 +71,15 @@ index a43544704109f21bab230dd9bf0401e28f878582..17f33c83c6033564d6bf4fbd388b0b84 RegistryOps<Tag> registryops = registryLookup.createSerializationContext(NbtOps.INSTANCE); List<MapBanner> list = (List) MapBanner.LIST_CODEC.parse(registryops, nbt.get("banners")).resultOrPartial((s) -> { +@@ -348,7 +351,7 @@ public class MapItemSavedData extends SavedData { + --this.trackedDecorationCount; + } + +- this.setDecorationsDirty(); ++ if (mapicon != null) this.setDecorationsDirty(); // Paper - only mark dirty if a change occurs + } + + public static void addTargetDecoration(ItemStack stack, BlockPos pos, String id, Holder<MapDecorationType> decorationType) { @@ -588,6 +591,21 @@ public class MapItemSavedData extends SavedData { public class HoldingPlayer { |