This commit is contained in:
Andrew Miner
2026-10-31 23:07:40 -06:00
parent 2b2e29a4fd
commit 1d53aa8550
3 changed files with 19 additions and 3 deletions
+4
View File
@@ -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",
})
+12
View File
@@ -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)
+3 -3
View File
@@ -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 },