mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 06:13:17 -04:00
Improved generating grass
more variety in density
This commit is contained in:
parent
230747c748
commit
bb6ddb7e89
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
local x1 = minp.x + math.floor((divx+1)*divlen)
|
||||
local z1 = minp.z + math.floor((divz+1)*divlen)
|
||||
-- Determine grass amount from perlin noise
|
||||
local grass_amount = math.floor(perlin1:get2d({x=x0, y=z0}) * 5 + 0)
|
||||
local grass_amount = math.floor(perlin1:get2d({x=x0, y=z0}) ^ 3 * 9)
|
||||
-- Find random positions for grass based on this random
|
||||
local pr = PseudoRandom(seed+1)
|
||||
for i=0,grass_amount do
|
||||
|
|
Loading…
Add table
Reference in a new issue