diff --git a/TrueCraft.Client/Modules/ChunkModule.cs b/TrueCraft.Client/Modules/ChunkModule.cs index a406fc8..dc45869 100644 --- a/TrueCraft.Client/Modules/ChunkModule.cs +++ b/TrueCraft.Client/Modules/ChunkModule.cs @@ -105,7 +105,6 @@ namespace TrueCraft.Client.Modules } } if (any) - // In theory this would ready the chunks, but it doesn't work for some reason Game.FlushMainThreadActions(); } diff --git a/TrueCraft.Client/TrueCraftGame.cs b/TrueCraft.Client/TrueCraftGame.cs index d57c89b..98d7097 100644 --- a/TrueCraft.Client/TrueCraftGame.cs +++ b/TrueCraft.Client/TrueCraftGame.cs @@ -250,14 +250,17 @@ namespace TrueCraft.Client public void FlushMainThreadActions() { Action action; - if (PendingMainThreadActions.TryTake(out action)) + while (PendingMainThreadActions.TryTake(out action)) action(); } protected override void Update(GameTime gameTime) { GameTime = gameTime; - FlushMainThreadActions(); + + Action action; + if (PendingMainThreadActions.TryTake(out action)) + action(); IChunk chunk; var adjusted = Client.World.World.FindBlockPosition(