diff --git a/mods/jvmi_biomes/definitions.lua b/mods/jvmi_biomes/definitions.lua index feab264..bebfcda 100644 --- a/mods/jvmi_biomes/definitions.lua +++ b/mods/jvmi_biomes/definitions.lua @@ -32,21 +32,25 @@ core.register_biome({ name = "land_plains", node_top = "jvmi_nodes:turf", depth_top = 1, node_filler = "jvmi_nodes:dirt", depth_filler = 3, + node_riverbed = "jvmi_nodes:sand", }) core.register_biome({ name = "land_hills", node_top = "jvmi_nodes:turf", depth_top = 1, node_filler = "jvmi_nodes:dirt", depth_filler = 2, + node_riverbed = "jvmi_nodes:gravel", }) core.register_biome({ name = "land_moors", node_top = "jvmi_nodes:turf", depth_top = 1, node_filler = "jvmi_nodes:dirt", depth_filler = 1, + node_riverbed = "jvmi_nodes:gravel", }) core.register_biome({ name = "land_mountains", node_top = "jvmi_nodes:gravel", depth_top = 1, + node_riverbed = "jvmi_nodes:gravel", }) diff --git a/mods/jvmi_biomes/mapgen.lua b/mods/jvmi_biomes/mapgen.lua index d805fce..6d891fd 100644 --- a/mods/jvmi_biomes/mapgen.lua +++ b/mods/jvmi_biomes/mapgen.lua @@ -10,6 +10,11 @@ local C = jvmi.C local Region = jvmi.Region +-- Constants --------------------------------------------------------------------------------------- + +local WATER_ID = core.get_content_id("jvmi_nodes:water_source") + + -- Public ------------------------------------------------------------------------------------------ --[[ @@ -63,9 +68,16 @@ function private.fill_surface(region) while y >= region.fill_min.y do if top_count > 0 then local content_id = core.get_content_id(biome.node_top) + if region:get_content_id(x, y+1, z) == WATER_ID then + if biome.node_riverbed then + content_id = core.get_content_id(biome.node_riverbed) + end + end + if content_id then region:set_content_id(x, y, z, content_id) end + top_count = top_count - 1 elseif filler_count > 0 then local content_id = core.get_content_id(biome.node_filler) diff --git a/mods/jvmi_first/constants.lua b/mods/jvmi_first/constants.lua index 889d13f..6883287 100644 --- a/mods/jvmi_first/constants.lua +++ b/mods/jvmi_first/constants.lua @@ -121,9 +121,9 @@ C.TERRAIN_TYPE_NOISE_PARAMS = { C.TERRAIN_TYPES = { { name = "ocean_floor", lowest = A.BEDROCK + 10, highest = A.BEDROCK + 26, weight = 5 }, { name = "ocean_abyss", lowest = A.ABYSS, highest = A.DEEP, weight = 15 }, - { name = "ocean_shelf", lowest = A.DEEP, highest = A.SHALLOW, weight = 10 }, - { name = "ocean_surface", lowest = A.SURFACE - 4, highest = A.SURFACE, weight = 5 }, - { name = "land_plains", lowest = A.PLAIN - 8, highest = A.PLAIN, weight = 20 }, + { name = "ocean_shelf", lowest = A.DEEP, highest = A.SHALLOW, weight = 5 }, + { name = "ocean_surface", lowest = A.SURFACE - 4, highest = A.SURFACE + 4, weight = 10 }, + { name = "land_plains", lowest = A.PLAIN - 12, highest = A.PLAIN, weight = 20 }, { name = "land_hills", lowest = A.HILL - 32, highest = A.HILL, weight = 25 }, { name = "land_moors", lowest = A.MOOR - 16, highest = A.MOOR, weight = 15 }, { name = "land_mountains", lowest = A.MOUNTAIN - 80, highest = A.MOUNTAIN, weight = 5 },