mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 03:43:46 +01:00
Also generate double grass when bonemealing grass blocks.
This commit is contained in:
parent
7938fba4a5
commit
ba1e0e4301
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user