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 (#11413)
* 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:
parent
d90c4f37f6
commit
5d6137bcc9
1 changed files with 9 additions and 0 deletions
|
@ -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 {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue