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 6e3eb9a28b6c190acfe37a03efce573da2da2749..135f282ad4ab70837f762d183ffab62f2a75d763 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 @@ -217,6 +217,7 @@ public class MapItemSavedData extends SavedData { } } + worldmap.setDirty(false); // SparklyPaper - reset dirty flag when loading maps from the disk return worldmap; }