Modding:Chunk Moddata: Difference between revisions

From Vintage Story Wiki
(Created page with "__FORCETOC__ {{GameVersion|1.12}} Before starting, you should have a development environment set up. If you don't have one already you should read the tutorial Setting up y...")
 
Line 75: Line 75:
             foreach (KeyValuePair<IServerChunk, int> chunk in hauntedChunks)
             foreach (KeyValuePair<IServerChunk, int> chunk in hauntedChunks)
             {
             {
                if(chunk.Value == 0) continue;
                 chunk.Key.SetServerModdata("haunting", SerializerUtil.Serialize(chunk.Value));
                 chunk.Key.SetServerModdata("haunting", SerializerUtil.Serialize(chunk.Value));
             }
             }