wip
This commit is contained in:
@@ -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",
|
||||
})
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user