improve near_nodes support

This commit is contained in:
Niklp09
2023-04-13 14:15:10 +02:00
parent cdfbf20ab0
commit 640cfd3ac7
5 changed files with 164 additions and 69 deletions

View File

@ -111,18 +111,34 @@ pl_seaweed.grow_seaweed = function(pos)
minetest.swap_node(right_here, {name=node_name, param2=math.random(1,3)})
end
biome_lib.register_on_generate({
surface = {"default:water_source"},
max_count = seaweed_max_count,
rarity = seaweed_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 4,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
pl.register_on_generate({
place_on = {
"default:water_source"
},
noise_params = {
scale = 0.00234375,
offset = 0,
seed = 0,
octaves = 3,
lacunarity = 2,
flags = "absvalue",
spread = {
x = 100,
y = 100,
z = 100
},
persist = 0.6
},
flags = "all_floors",
y_min = 1,
y_max = 40,
near_nodes = {
"default:dirt_with_grass"
},
near_nodes_size = 1
},
"pl_seaweed:water_grass",
nil,
pl_seaweed.grow_seaweed
)