Translations:Modding:Chunk Moddata/8/en

From Vintage Story Wiki

We'll use a Dictionary<IServerChunk, int> to hold a list of chunks and the amount of player deaths that occurred on them (which we'll call haunting level). This list will be updated ingame as players die or use beds, and each chunk's haunting level will fetched from custom data if the chunk ever had such value. When the game saves, we iterate through our Dictionary<IServerChunk, int> and store the haunting level for each chunk as persistent custom data!