public void SetBiomeId(int x, int z, int biomeId) { Chunk chunk = GetChunk(x, 0, z); if (chunk != null && chunk.isTerrainDataPrepared) { chunk.SetBiomeId(x - chunk.worldPos.x, z - chunk.worldPos.z, biomeId, true); } }
public void Generate(Chunk chunk) { GenerateBiomeAndTerrain(chunk); AddBiomeBlocks(chunk); for (int x = 0; x < Chunk.chunkWidth; x++) { for (int z = 0; z < Chunk.chunkDepth; z++) { chunk.SetBiomeId(x, z, this.biomeArray[x + Chunk.chunkDepth * z], true); } } }