From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: MrPowerGamerBR Date: Wed, 5 Jun 2024 15:20:00 -0300 Subject: [PATCH] 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/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java index 6bcb565cd60b60be9255ef537591ee821caab7b5..83ca73240aae660f565e016565b147018f9f407f 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 @@ -218,6 +218,7 @@ public class MapItemSavedData extends SavedData { } } + worldmap.setDirty(false); // SparklyPaper - reset dirty flag when loading maps from the disk return worldmap; }