public void EasyUpdateChunk(Chunk ch) { ch.AddToWorld(); if (!ch.CreateVBO()) { return; } }
public void LightForChunks(Chunk ch, Chunk above) { ch.CalcSkyLight(above); TheClient.Schedule.ScheduleSyncTask(() => { CalcingLights.Remove(ch.WorldPosition); ch.AddToWorld(); ch.CreateVBO(); }); }
public void LightForChunks(Chunk ch, Chunk above) { // TODO: Prevent double-skylight-recalc ch.CalcSkyLight(above); TheClient.Schedule.ScheduleSyncTask(() => { ch.AddToWorld(); ch.CreateVBO(); Chunk below = GetChunk(ch.WorldPosition + new Vector3i(0, 0, -1)); if (below != null) { TheClient.Schedule.StartASyncTask(() => { LightForChunks(below, ch); }); } }); }
public void LightForChunks(Chunk ch, Chunk above) { ch.CalcSkyLight(above); TheClient.Schedule.ScheduleSyncTask(() => { ch.AddToWorld(); if (!ch.CreateVBO()) { return; } Chunk below = GetChunk(ch.WorldPosition + new Vector3i(0, 0, -1)); if (below != null) { TheClient.Schedule.StartAsyncTask(() => { LightForChunks(below, ch); }); } }); }