9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-04 15:41:40 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0193-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch
Dreeam 3c25377465 Drop some unused patches
ClassInstanceMultiMap belongs to Minecraft vanilla entity storage.
And is unused, since replaced by spottedleaf's entity storage (rewrite chunk system).
However these patches might be useful for vanilla entity storage if is used.
2025-07-09 04:20:02 +08:00

23 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Wed, 5 Jun 2024 15:20:00 -0300
Subject: [PATCH] SparklyPaper: Reset dirty flag when loading maps from the
disk
By default, the server will start rewriting all map datas to the disk after loading it, even if the map didn't have any changes
This also slows down world saving a lot if you have a lot of maps
diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
index d049af4f129f6ac2d53f10c7a811c989d1f3edc0..81c30f4a4f411ccedf74e589294a5d279bf51663 100644
--- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
+++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
@@ -160,6 +160,7 @@ public class MapItemSavedData extends SavedData {
}
this.vanillaRender.buffer = colors.array(); // Paper - Use Vanilla map renderer when possible
+ this.setDirty(false); // SparklyPaper - reset dirty flag when loading maps from the disk (context for updates: this modification is at the end of the map "load" function)
}
public static MapItemSavedData createFresh(