Splizard wrote:Just a suggestion, could you change it so jungle grass only spawns in certain biomes/areas?
I find after awhile junglegrass is absolutely everywhere and this would help prevent that.
You can do this by testing minetest.env:get_perlin in the abm (see my snow mod as an example).
VanessaE wrote:Well I think of junglegrass as more like "wild grass", since we don't have jungle biomes anymore. At any rate, I'd try the perlin noise thing but I haven't the faintest clue how it works :-)
function (pos, node, active_object_count, active_object_count_wider)
local perlin = minetest.env:get_perlin(seedif,3, 0.5, scale)
--scale is the average size of the noise eg. 150
--seedif is the difference in seed just give it a number
--This is how common the biome is.
--Compare the noise variable with a value from -1 to 1 (> -1 = everywhere, > 1 = nowhere)
--eg. > 0.35 is as common as deserts, > 0.53 is as common as snow
local noise = perlin:get2d({x=pos.x, y=pos.z})
if noise > 0.35 then
--junglegrass stuff here
end
end
Users browsing this forum: No registered users and 65 guests