generated from AriasCreations/vsmodtemplate
Attempt to fix a crash when no RTP checks are active that match the chunk generated/loaded.
This commit is contained in:
parent
6e0dbb361a
commit
40f8eb4048
2 changed files with 7 additions and 2 deletions
|
@ -154,6 +154,11 @@ public class RTPFactory
|
|||
|
||||
internal static void ChunkLoaded(Vec2i chunkCoord, IWorldChunk[] chunks)
|
||||
{
|
||||
// Check if this is even a valid check
|
||||
var num = ChunkChecks.Where(x => x.ChunkX == chunkCoord.X && x.ChunkZ == chunkCoord.Y).Count();
|
||||
if (num == 0) return;
|
||||
|
||||
|
||||
// Get the chunk from the stack
|
||||
var chunk = ChunkChecks.Where(x => x.ChunkX == chunkCoord.X && x.ChunkZ == chunkCoord.Y).First();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue