1
0
Fork 0

Also generate double grass when bonemealing grass blocks.

This commit is contained in:
kabou 2022-05-04 14:55:19 +02:00
parent b20d06706c
commit 2a154838f9
1 changed files with 11 additions and 1 deletions

View File

@ -71,8 +71,18 @@ local biome_flowers_tables = {
--
local function add_random_flower(pos, color)
-- 90% tall grass, 10% flower
if math.random(1,100) <= 90 then
local rnd = math.random(1,100)
if rnd <= 60 then
minetest.add_node(pos, {name="mcl_flowers:tallgrass", param2=color})
elseif rnd <= 80 then
-- double tallgrass
local toppos = vector.offset(pos, 0, 1, 0)
local topnode = minetest.get_node(toppos)
if minetest.registered_nodes[topnode.name].buildable_to then
minetest.set_node(pos, { name = "mcl_flowers:double_grass", param2 = color })
minetest.set_node(toppos, { name = "mcl_flowers:double_grass_top", param2 = color })
return true
end
else
local flowers_table
if mg_name == "v6" then