2018-02-18 01:28:43 +01:00
|
|
|
-----------------------------------------------------------------------------------------------
|
|
|
|
-- Grasses - More Tall Grass 0.0.2
|
|
|
|
-----------------------------------------------------------------------------------------------
|
|
|
|
-- by Mossmanikin
|
|
|
|
|
|
|
|
-- Contains code from: biome_lib
|
|
|
|
-- Looked at code from: default
|
|
|
|
-----------------------------------------------------------------------------------------------
|
|
|
|
|
2020-07-23 22:45:28 +02:00
|
|
|
local random = math.random
|
|
|
|
|
2018-02-18 01:28:43 +01:00
|
|
|
abstract_dryplants.grow_grass = function(pos)
|
|
|
|
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
|
|
|
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
|
|
|
or minetest.get_node(right_here).name == "default:junglegrass" then
|
2020-07-23 22:45:28 +02:00
|
|
|
minetest.swap_node(right_here, {name="default:grass_"..random(1,5)})
|
2018-02-18 01:28:43 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
biome_lib:register_generate_plant({
|
|
|
|
surface = {
|
|
|
|
"default:dirt_with_grass",
|
|
|
|
"stoneage:grass_with_silex",
|
|
|
|
"sumpf:peat",
|
|
|
|
"sumpf:sumpf"
|
|
|
|
},
|
|
|
|
max_count = TALL_GRASS_PER_MAPBLOCK,
|
|
|
|
rarity = 101 - TALL_GRASS_RARITY,
|
|
|
|
min_elevation = 1, -- above sea level
|
|
|
|
plantlife_limit = -0.9,
|
|
|
|
},
|
|
|
|
abstract_dryplants.grow_grass
|
|
|
|
)
|