1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-01-31 03:50:36 +01:00

Only mark decorations dirty if a removal actually occurs ()

* Only mark decorations dirty if a removal actually occurs

Vanilla calls this method blindly inside of a loop which erroniously marks
map data files as being dirty even if nothing has actually changed.

* Merge into existing patch

---------

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
This commit is contained in:
Shane Freeder 2024-09-19 15:27:33 +01:00
parent d90c4f37f6
commit 5d6137bcc9

View file

@ -72,6 +72,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
RegistryOps<Tag> registryops = registryLookup.createSerializationContext(NbtOps.INSTANCE);
List<MapBanner> list = (List) MapBanner.LIST_CODEC.parse(registryops, nbt.get("banners")).resultOrPartial((s) -> {
@@ -0,0 +0,0 @@ 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) {
@@ -0,0 +0,0 @@ public class MapItemSavedData extends SavedData {
public class HoldingPlayer {