Esempio n. 1
0
 /// <summary>
 /// Returns true if the ChunkRegionManager should unload the world when entering this subworld,
 /// returns false if the world should be kept loaded.
 /// ............
 /// Designed sich that small subworlds do not require the world to be unloaded, resulting in quicker loading times
 /// </summary>
 /// <returns></returns>
 public virtual bool ShouldUnloadWorldOnEnter()
 {
     if (SubworldChunks.GetLength(0) * SubworldChunks.GetLength(1) <= 12)
     {
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
 public ChunkData GetChunkSafe(int x, int z)
 {
     if (SubworldChunks.GetLength(0) <= x || x < 0)
     {
         return(null);
     }
     if (SubworldChunks.GetLength(1) <= z || z < 0)
     {
         return(null);
     }
     return(SubworldChunks[x, z]);
 }