Map autosave regression after maps moved to server-global SavedDataStorage
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 4.4k
- Forks
- 623
- PR merge metrics
- No merged PRs in 30d
Description
Expected behavior
Filled map data should be periodically saved to disk according to ticks-per.autosave, like on Paper.
Observed/Actual behavior
Map data is not saved during normal runtime and is only written during a clean shutdown.
This appears to be a regression of #372.
Current map creation/access uses the server-global storage:
server.getDataStorage()
but Folia's map autosave still calls:
world.getDataStorage().saveMaps();
These are different SavedDataStorage instances, so the periodic autosave scans the wrong storage.
Steps/models to reproduce
- Start Folia with:
ticks-per:
autosave: 6000
- Create a new filled map or update an existing one.
- Wait longer than 5 minutes.
- Check
world/data/minecraft/maps/.
The map .dat file is not created or updated during runtime.
- Stop the server normally.
The map data is then written during shutdown.
Plugin and Datapack List
None.
Folia version
[13:52:55 INFO]: Checking version, please wait...
[13:52:55 INFO]: This server is running Folia version 26.2-7-ver/26.2.x@14b7fee (2026-08-25T13:29:28Z) (Implementing API version 26.2.build.7-beta)
You are running the latest version
Other
Map autosaving was originally added in 44f4aabe to fix #372.
After map SavedData was moved to MinecraftServer#getDataStorage(), Folia's autosave path continued using world.getDataStorage().
The likely fix is to make map autosaving server-global and call:
MinecraftServer.getServer().getDataStorage().saveMaps();
once per autosave interval instead of once per world.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the autosave path that calls world.getDataStorage().saveMaps() and compare it with map creation through server.getDataStorage(). Reproduce with ticks-per.autosave set to 6000 and inspect world/data/minecraft/maps/. Done means filled map data is written or updated during runtime once per autosave interval, rather than only at shutdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100