2024-10-24 01:24:22 +02:00
|
|
|
-- Sugar canes
|
2024-11-01 00:28:11 +01:00
|
|
|
local biomes = vl_biomes.overworld_biomes
|
|
|
|
local bmap = {}
|
|
|
|
for b = 1, #biomes do
|
|
|
|
if minetest.registered_biomes[biomes[b]] then -- ignore missing biomes
|
|
|
|
local param2 = minetest.registered_biomes[biomes[b]]._mcl_grass_palette_index or 0
|
|
|
|
if not bmap[param2] then bmap[param2] = {} end
|
|
|
|
table.insert(bmap[param2], biomes[b])
|
|
|
|
else
|
|
|
|
minetest.log("warning", "Biome not found: "..biomes[b])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
for param2, bs in pairs(bmap) do
|
2024-10-24 17:09:49 +02:00
|
|
|
mcl_mapgen_core.register_decoration({
|
|
|
|
deco_type = "simple",
|
|
|
|
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block_no_snow", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
|
|
|
|
sidelen = 16,
|
|
|
|
noise_params = {
|
|
|
|
offset = -0.3,
|
|
|
|
scale = 0.7,
|
|
|
|
spread = vector.new(200, 200, 200),
|
|
|
|
seed = 2,
|
|
|
|
octaves = 3,
|
|
|
|
persist = 0.7
|
|
|
|
},
|
|
|
|
y_min = 1,
|
|
|
|
y_max = vl_biomes.overworld_max,
|
|
|
|
decoration = "mcl_core:reeds",
|
|
|
|
height = 1,
|
|
|
|
height_max = 3,
|
2024-10-24 22:44:22 +02:00
|
|
|
spawn_by = {"mcl_core:water_source", "mclx_core:river_water_source", "group:frosted_ice"},
|
2024-10-24 17:09:49 +02:00
|
|
|
num_spawn_by = 1,
|
2024-11-01 00:28:11 +01:00
|
|
|
biomes = bs,
|
|
|
|
param2 = param2
|
2024-10-24 17:09:49 +02:00
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
-- additional reeds in swamps
|
2024-10-24 01:24:22 +02:00
|
|
|
mcl_mapgen_core.register_decoration({
|
|
|
|
deco_type = "simple",
|
|
|
|
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block_no_snow", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
|
|
|
|
sidelen = 16,
|
|
|
|
noise_params = {
|
2024-11-01 00:28:11 +01:00
|
|
|
offset = 0.1,
|
2024-10-24 01:24:22 +02:00
|
|
|
scale = 0.5,
|
2024-11-01 00:28:11 +01:00
|
|
|
spread = vector.new(100, 100, 100),
|
|
|
|
seed = 3,
|
2024-10-24 01:24:22 +02:00
|
|
|
octaves = 3,
|
|
|
|
persist = 0.7,
|
|
|
|
},
|
|
|
|
biomes = {"Swampland", "Swampland_shore"},
|
|
|
|
y_min = 1,
|
|
|
|
y_max = vl_biomes.overworld_max,
|
|
|
|
decoration = "mcl_core:reeds",
|
|
|
|
height = 1,
|
|
|
|
height_max = 3,
|
|
|
|
spawn_by = {"mcl_core:water_source", "group:frosted_ice"},
|
|
|
|
num_spawn_by = 1,
|
2024-11-01 00:28:11 +01:00
|
|
|
param2 = 28 -- Swampland grass palette index
|
2024-10-24 01:24:22 +02:00
|
|
|
})
|
|
|
|
|