UtilityConnect:Persistence
Networks survive server restarts. This page explains what Utility Connect saves, when it saves it and what happens when chunks load and unload.
What is saved
For every chunk that contains network blocks, Utility Connect stores a small list inside the chunk's own data:
- the positions of all network blocks in that chunk, and
- which of them are connectors.
It does not save the networks themselves. Which blocks are connected to which is worked out again every time a chunk loads, from the block positions and their roles. Utility Connect also saves no items, fluids or other contents. Those belong to the blocks and the mod that adds them.
Because the data lives in the chunk, it is saved, copied and backed up together with the world. There are no extra files.
When it is saved
The list of a chunk is updated as soon as a network block in it is placed or broken, at the end of the same server tick. The chunk is then marked for saving, and the server writes it to disk with its next regular save. Placing the same block twice does not cause a second write.
After a restart
When a chunk loads, Utility Connect reads its list and rebuilds the networks in it as soon as the chunk's blocks can be read. Connections to neighbouring chunks form again once those chunks are loaded too, in any order.
Role check on load
A mod that uses Utility Connect can tell it which of its blocks are devices and which are connectors (see Registering Nodes). When a chunk loads, Utility Connect asks that mod about every stored block and fixes the stored role if it is wrong. Corrected chunks are saved again.
This matters most for worlds saved with version 0.1.0-Alpha, which did not store roles yet. Without the check every block would load as a device, and all networks would fall apart after a restart until each pipe was placed again.
Unloaded chunks
Hytale gives mods no safe way to react to chunks unloading. Instead, Utility Connect checks its list of chunks against the server every 64 loaded chunks and forgets the ones that are no longer loaded. Until that check runs, some unloaded positions may stay in memory. This costs a little memory and nothing else, because the networks are always rebuilt from the saved lists.
Log messages
The library writes its log messages in German. The ones you may see at normal log level:
| Message | Level | Meaning |
|---|---|---|
UtilityConnect setup() abgeschlossen |
INFO | The library is ready for dependent mods. |
UtilityConnect 1.0.0 bereit |
INFO | The library has started. |
Chunk-Anbindung registriert |
INFO | Chunk loading and saving are hooked up. |
Knotenarten in Chunk(x, z) geprueft: … berichtigt |
INFO | Stored roles in this chunk were wrong and have been corrected (see above). Common once after an update from 0.1.0-Alpha, then it should not appear again. |
Abgleich in Welt '…': N entladene Chunks vergessen |
INFO | The unload check removed N chunks from memory. Normal. |
Chunk … stand nach 20 Versuchen nicht im Store – N Knoten nicht uebernommen |
WARNING | A chunk did not finish loading within about 20 ticks, and its network blocks were not added to networks. The saved list itself is not changed by this. |
UtilityConnect beendet (…) |
INFO | Shutdown, with the number of loaded and forgotten chunks. |
To follow every chunk load and save in detail, set the log level of Utility Connect to FINE.
| Utility Connect |
|---|
| Installation · Networks · Persistence · Version History |
| For modders: Modding API · Registering Nodes · Transport API |
| Project page on mutigeraffe.com · Download on CurseForge |