void Generate(Chunk chunk, ref IntVector3 chunkSize, ref IntVector3 chunkPosition, int x, int y, int z, BiomeElement biomeElement)
        {
            var h = chunkPosition.Y * chunkSize.Y + y;

            byte index = Block.EmptyIndex;

            if (Height == h)
            {
                // Horizon.
                switch (biomeElement)
                {
                    case BiomeElement.Desert:
                        index = Region.BlockCatalog.SandIndex;
                        break;
                    case BiomeElement.Forest:
                        index = Region.BlockCatalog.DirtIndex;
                        break;
                    case BiomeElement.Mountains:
                        index = Region.BlockCatalog.StoneIndex;
                        break;
                    case BiomeElement.Plains:
                        index = Region.BlockCatalog.GrassIndex;
                        break;
                    case BiomeElement.Snow:
                        index = Region.BlockCatalog.SnowIndex;
                        break;
                }
            }
            else if (h < Height)
            {
                // Below the horizon.
                switch (biomeElement)
                {
                    case BiomeElement.Desert:
                        index = Region.BlockCatalog.SandIndex;
                        break;
                    case BiomeElement.Forest:
                        index = Region.BlockCatalog.DirtIndex;
                        break;
                    case BiomeElement.Mountains:
                        index = Region.BlockCatalog.StoneIndex;
                        break;
                    case BiomeElement.Plains:
                        index = Region.BlockCatalog.DirtIndex;
                        break;
                    case BiomeElement.Snow:
                        index = Region.BlockCatalog.SnowIndex;
                        break;
                }
            }

            chunk.SetBlockIndex(x, y, z, index);
        }
        byte GetBlockIndexBelowTop(BiomeElement biomeElement)
        {
            switch (biomeElement)
            {
                case BiomeElement.Desert:
                    return Region.BlockCatalog.SandIndex;
                case BiomeElement.Forest:
                    return Region.BlockCatalog.DirtIndex;
                case BiomeElement.Mountains:
                    return Region.BlockCatalog.StoneIndex;
                case BiomeElement.Plains:
                    return Region.BlockCatalog.DirtIndex;
                case BiomeElement.Snow:
                    return Region.BlockCatalog.SnowIndex;
            }

            throw new InvalidOperationException();
        }