2024-10-24 17:09:49 +02:00
|
|
|
-- TODO: move to mcl_ocean with a late registration (when biomes are registered)?
|
|
|
|
local function register_seagrass_decoration(offset, scale, biomes)
|
|
|
|
local surfaces = {"mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel", "mcl_core:redsand"}
|
|
|
|
local nodes = {"mcl_ocean:seagrass_dirt", "mcl_ocean:seagrass_sand", "mcl_ocean:seagrass_gravel", "mcl_ocean:seagrass_redsand"}
|
2024-10-24 01:24:22 +02:00
|
|
|
|
|
|
|
for s = 1, #surfaces do
|
|
|
|
mcl_mapgen_core.register_decoration({
|
2024-10-24 17:09:49 +02:00
|
|
|
name = "Seagrass on "..surfaces[s],
|
2024-10-24 01:24:22 +02:00
|
|
|
deco_type = "simple",
|
|
|
|
priority = 1500,
|
|
|
|
place_on = {surfaces[s]},
|
|
|
|
sidelen = 16,
|
2024-10-24 17:09:49 +02:00
|
|
|
noise_params = {
|
|
|
|
offset = offset,
|
|
|
|
scale = scale,
|
|
|
|
spread = vector.new(100, 100, 100),
|
|
|
|
seed = 16,
|
|
|
|
octaves = 3,
|
|
|
|
persist = 0.6,
|
|
|
|
},
|
2024-10-24 01:24:22 +02:00
|
|
|
biomes = biomes,
|
|
|
|
y_min = vl_biomes.DEEP_OCEAN_MIN,
|
2024-10-24 17:09:49 +02:00
|
|
|
y_max = 0,
|
2024-10-24 01:24:22 +02:00
|
|
|
decoration = nodes[s],
|
2024-10-24 17:09:49 +02:00
|
|
|
--param2 = 3, -- always use meshoption 3
|
|
|
|
param2 = 0,
|
|
|
|
param2_max = 3,
|
2024-10-24 01:24:22 +02:00
|
|
|
place_offset_y = -1,
|
|
|
|
flags = "force_placement",
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
-- TODO: use temperature classes, rather than hardcoding biome lists here?
|
|
|
|
-- Also would allow for more/less seagrass depending on temperature class
|
2024-10-24 17:09:49 +02:00
|
|
|
register_seagrass_decoration(0, 0.5, {
|
2024-10-24 01:24:22 +02:00
|
|
|
"ColdTaiga_ocean",
|
|
|
|
"ExtremeHills_ocean",
|
|
|
|
"ExtremeHillsM_ocean",
|
|
|
|
"ExtremeHills+_ocean",
|
|
|
|
"Taiga_ocean",
|
|
|
|
"MegaTaiga_ocean",
|
|
|
|
"MegaSpruceTaiga_ocean",
|
|
|
|
"StoneBeach_ocean",
|
|
|
|
"Plains_ocean",
|
|
|
|
"SunflowerPlains_ocean",
|
|
|
|
"Forest_ocean",
|
|
|
|
"FlowerForest_ocean",
|
|
|
|
"BirchForest_ocean",
|
|
|
|
"BirchForestM_ocean",
|
|
|
|
"RoofedForest_ocean",
|
|
|
|
"Swampland_ocean",
|
|
|
|
"Jungle_ocean",
|
|
|
|
"JungleM_ocean",
|
|
|
|
"JungleEdge_ocean",
|
|
|
|
"JungleEdgeM_ocean",
|
|
|
|
"MushroomIsland_ocean",
|
|
|
|
"Desert_ocean",
|
|
|
|
"Savanna_ocean",
|
|
|
|
"SavannaM_ocean",
|
|
|
|
"Mesa_ocean",
|
|
|
|
"MesaBryce_ocean",
|
|
|
|
"MesaPlateauF_ocean",
|
|
|
|
"MesaPlateauFM_ocean",
|
|
|
|
|
|
|
|
"ColdTaiga_deep_ocean",
|
|
|
|
"ExtremeHills_deep_ocean",
|
|
|
|
"ExtremeHillsM_deep_ocean",
|
|
|
|
"ExtremeHills+_deep_ocean",
|
|
|
|
"Taiga_deep_ocean",
|
|
|
|
"MegaTaiga_deep_ocean",
|
|
|
|
"MegaSpruceTaiga_deep_ocean",
|
|
|
|
"StoneBeach_deep_ocean",
|
|
|
|
"Plains_deep_ocean",
|
|
|
|
"SunflowerPlains_deep_ocean",
|
|
|
|
"Forest_deep_ocean",
|
|
|
|
"FlowerForest_deep_ocean",
|
|
|
|
"BirchForest_deep_ocean",
|
|
|
|
"BirchForestM_deep_ocean",
|
|
|
|
"RoofedForest_deep_ocean",
|
|
|
|
"Swampland_deep_ocean",
|
|
|
|
"Jungle_deep_ocean",
|
|
|
|
"JungleM_deep_ocean",
|
|
|
|
"JungleEdge_deep_ocean",
|
|
|
|
"JungleEdgeM_deep_ocean",
|
|
|
|
"MushroomIsland_deep_ocean",
|
|
|
|
"Desert_deep_ocean",
|
|
|
|
"Savanna_deep_ocean",
|
|
|
|
"SavannaM_deep_ocean",
|
|
|
|
"Mesa_deep_ocean",
|
|
|
|
"MesaBryce_deep_ocean",
|
|
|
|
"MesaPlateauF_deep_ocean",
|
|
|
|
"MesaPlateauFM_deep_ocean",
|
|
|
|
|
|
|
|
"Mesa_sandlevel",
|
|
|
|
"MesaBryce_sandlevel",
|
|
|
|
"MesaPlateauF_sandlevel",
|
|
|
|
"MesaPlateauFM_sandlevel",
|
|
|
|
"Swampland_shore",
|
|
|
|
"Jungle_shore",
|
|
|
|
"JungleM_shore",
|
|
|
|
"Savanna_beach",
|
|
|
|
"FlowerForest_beach",
|
|
|
|
"ColdTaiga_beach_water",
|
|
|
|
"ExtremeHills_beach",
|
|
|
|
})
|
|
|
|
|
2024-10-24 17:09:49 +02:00
|
|
|
local function register_kelp_decoration(offset, scale, biomes)
|
|
|
|
local surfaces = {"mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel"}
|
|
|
|
local nodes = {"mcl_ocean:kelp_dirt", "mcl_ocean:kelp_sand", "mcl_ocean:kelp_gravel"}
|
|
|
|
for s = 1, #surfaces do
|
|
|
|
mcl_mapgen_core.register_decoration({
|
|
|
|
name = "Kelp on "..surfaces[s],
|
|
|
|
deco_type = "simple",
|
|
|
|
priority = 1500,
|
|
|
|
place_on = {surfaces[s]},
|
|
|
|
sidelen = 16,
|
|
|
|
noise_params = {
|
|
|
|
offset = offset,
|
|
|
|
scale = scale,
|
|
|
|
spread = vector.new(100, 100, 100),
|
|
|
|
seed = 32,
|
|
|
|
octaves = 3,
|
|
|
|
persist = 0.6,
|
|
|
|
},
|
|
|
|
biomes = biomes,
|
|
|
|
y_min = vl_biomes.DEEP_OCEAN_MIN,
|
|
|
|
y_max = -6,
|
|
|
|
decoration = nodes[s],
|
|
|
|
param2 = 16,
|
|
|
|
param2_max = 96, -- height * 16
|
|
|
|
place_offset_y = -1,
|
|
|
|
flags = "force_placement",
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
register_kelp_decoration(-0.5, 1, {
|
2024-10-24 01:24:22 +02:00
|
|
|
"ExtremeHillsM_ocean",
|
|
|
|
"ExtremeHills+_ocean",
|
|
|
|
"MegaTaiga_ocean",
|
|
|
|
"MegaSpruceTaiga_ocean",
|
|
|
|
"Plains_ocean",
|
|
|
|
"SunflowerPlains_ocean",
|
|
|
|
"Forest_ocean",
|
|
|
|
"FlowerForest_ocean",
|
|
|
|
"BirchForest_ocean",
|
|
|
|
"BirchForestM_ocean",
|
|
|
|
"RoofedForest_ocean",
|
|
|
|
"Swampland_ocean",
|
|
|
|
"Jungle_ocean",
|
|
|
|
"JungleM_ocean",
|
|
|
|
"JungleEdge_ocean",
|
|
|
|
"JungleEdgeM_ocean",
|
|
|
|
"MushroomIsland_ocean",
|
|
|
|
|
|
|
|
"ExtremeHillsM_deep_ocean",
|
|
|
|
"ExtremeHills+_deep_ocean",
|
|
|
|
"MegaTaiga_deep_ocean",
|
|
|
|
"MegaSpruceTaiga_deep_ocean",
|
|
|
|
"Plains_deep_ocean",
|
|
|
|
"SunflowerPlains_deep_ocean",
|
|
|
|
"Forest_deep_ocean",
|
|
|
|
"FlowerForest_deep_ocean",
|
|
|
|
"BirchForest_deep_ocean",
|
|
|
|
"BirchForestM_deep_ocean",
|
|
|
|
"RoofedForest_deep_ocean",
|
|
|
|
"Swampland_deep_ocean",
|
|
|
|
"Jungle_deep_ocean",
|
|
|
|
"JungleM_deep_ocean",
|
|
|
|
"JungleEdge_deep_ocean",
|
|
|
|
"JungleEdgeM_deep_ocean",
|
|
|
|
"MushroomIsland_deep_ocean",
|
|
|
|
})
|