sunflower mapgen bug fix

This commit is contained in:
JoseDouglas26 2023-12-14 13:29:37 -03:00 committed by the-real-herowl
parent 113f07581b
commit dd5a9178d9
1 changed files with 52 additions and 24 deletions

View File

@ -4804,32 +4804,60 @@ local function register_decorations()
b = {"FlowerForest"} b = {"FlowerForest"}
end end
minetest.register_decoration({ if name ~= "sunflower" then
deco_type = "schematic", minetest.register_decoration({
schematic = { deco_type = "schematic",
size = {x = 1, y = 3, z = 1}, schematic = {
data = { size = {x = 1, y = 3, z = 1},
{name = "air", prob = 0}, data = {
{name = "mcl_flowers:" .. name, param1 = 255, }, {name = "air", prob = 0},
{name = "mcl_flowers:" .. name .. "_top", param1 = 255, }, {name = "mcl_flowers:" .. name, param1 = 255, },
{name = "mcl_flowers:" .. name .. "_top", param1 = 255, },
},
}, },
}, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
offset = o, offset = o,
scale = 0.01, scale = 0.01,
spread = {x = 300, y = 300, z = 300}, spread = {x = 300, y = 300, z = 300},
seed = seed, seed = seed,
octaves = 5, octaves = 5,
persist = 0.62, persist = 0.62,
}, },
y_min = 1, y_min = 1,
y_max = mcl_vars.mg_overworld_max, y_max = mcl_vars.mg_overworld_max,
flags = "", flags = "",
biomes = b, biomes = b,
}) })
else
minetest.register_decoration({
deco_type = "schematic",
schematic = {
size = {x = 1, y = 2, z = 1},
data = {
{name = "air", prob = 0},
{name = "mcl_flowers:" .. name, param1 = 255, },
},
},
place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
sidelen = 16,
noise_params = {
offset = o,
scale = 0.01,
spread = {x = 300, y = 300, z = 300},
seed = seed,
octaves = 5,
persist = 0.62,
},
y_min = 1,
y_max = mcl_vars.mg_overworld_max,
flags = "",
biomes = b,
})
end
end end
end end