/// <summary> /// Populates a chunk using the default Manic Digger chunk generation algorithm. /// </summary> /// <param name="map"></param> /// <param name="x"></param> /// <param name="y"></param> /// <param name="z"></param> public override void PopulateChunk(IMapStorage map, int x, int y, int z) { x *= this.ChunkSize; y *= this.ChunkSize; z *= this.ChunkSize; if (!EnableBigTrees) { PopulationTools.MakeSmallTrees(map, x, y, z, this.ChunkSize, _rnd, 30); } else { PopulationTools.MakeTrees(map, x, y, z, this.ChunkSize, _rnd); } PopulationTools.MakeCaves(map, x, y, z, this.ChunkSize, _rnd, this.EnableCaves, gravellength, goldorelength, ironorelength, coalorelength, dirtlength, silverlength); }
public void PopulateChunk(IMapStorage map, int x, int y, int z) { x *= this.ChunkSize; y *= this.ChunkSize; z *= this.ChunkSize; //forests //if (Math.Abs(treenoise.GetValue(x, 0, y)) >= 0.9) double count = treenoise.GetValue(x, 0, y) * 1000; { count = System.Math.Min(count, 300); PopulationTools.MakeSmallTrees(map, x, y, z, this.ChunkSize, _rnd, (int)count); } //random trees PopulationTools.MakeSmallTrees(map, x, y, z, this.ChunkSize, _rnd, treeCount + 10 - (10 - treeCount / 10)); PopulationTools.MakeCaves(map, x, y, z, this.ChunkSize, _rnd, this.EnableCaves, gravellength, goldorelength, ironorelength, coalorelength, dirtlength, silverlength); }