Exemplo n.º 1
0
        public virtual ChunkColumn GenerateChunkColumn(ChunkCoordinates chunkCoordinates, bool cacheOnly = false)
        {
            var chunk = WorldProvider.GenerateChunkColumn(chunkCoordinates, cacheOnly);

            if (chunk != null)
            {
                Level.EventDispatcher.DispatchEvent(new ChunkGeneratedEvent(chunkCoordinates, chunk, Level));
            }

            return(chunk);
        }
Exemplo n.º 2
0
 public void GenerateChunkRadius(int radius)
 {
     for (int x = radius; x > -radius; x--)
     {
         for (int z = radius; z > -radius; z--)
         {
             //Debug.WriteLine($"Generating Chunk at ({x},{z})");
             WorldProvider.GenerateChunkColumn(new ChunkCoordinates(x, z));
         }
     }
 }
Exemplo n.º 3
0
 private ChunkColumn GetChunk(int x, int z)
 {
     return(WorldProvider.GenerateChunkColumn(new ChunkCoordinates(x, z)));
 }
Exemplo n.º 4
0
 private ChunkColumn GetChunk(BlockCoordinates blockCoordinates)
 {
     return(WorldProvider.GenerateChunkColumn(new ChunkCoordinates(blockCoordinates.X >> 4, blockCoordinates.Z >> 4)));
 }