Fix unnecessary map data saves (#12296)

This commit is contained in:
Dqu1J
2025-04-30 16:51:13 +01:00
committed by GitHub
parent 1e930763d2
commit 646b80ca53
2 changed files with 17 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ public class CraftMapCanvas implements MapCanvas {
return;
if (this.buffer[y * 128 + x] != color) {
this.buffer[y * 128 + x] = color;
this.mapView.worldMap.setColorsDirty(x, y);
this.mapView.worldMap.setColorsDirty(x, y, false); // Paper - Fix unnecessary map data saves
}
}
@@ -141,8 +141,8 @@ public class CraftMapCanvas implements MapCanvas {
}
// Mark all colors within the image as dirty
this.mapView.worldMap.setColorsDirty(destX, destY);
this.mapView.worldMap.setColorsDirty(destX + effectiveWidth - 1, destY + effectiveHeight - 1);
this.mapView.worldMap.setColorsDirty(destX, destY, false);
this.mapView.worldMap.setColorsDirty(destX + effectiveWidth - 1, destY + effectiveHeight - 1, false);
// Paper end
}