wip
This commit is contained in:
@@ -32,21 +32,25 @@ core.register_biome({
|
|||||||
name = "land_plains",
|
name = "land_plains",
|
||||||
node_top = "jvmi_nodes:turf", depth_top = 1,
|
node_top = "jvmi_nodes:turf", depth_top = 1,
|
||||||
node_filler = "jvmi_nodes:dirt", depth_filler = 3,
|
node_filler = "jvmi_nodes:dirt", depth_filler = 3,
|
||||||
|
node_riverbed = "jvmi_nodes:sand",
|
||||||
})
|
})
|
||||||
|
|
||||||
core.register_biome({
|
core.register_biome({
|
||||||
name = "land_hills",
|
name = "land_hills",
|
||||||
node_top = "jvmi_nodes:turf", depth_top = 1,
|
node_top = "jvmi_nodes:turf", depth_top = 1,
|
||||||
node_filler = "jvmi_nodes:dirt", depth_filler = 2,
|
node_filler = "jvmi_nodes:dirt", depth_filler = 2,
|
||||||
|
node_riverbed = "jvmi_nodes:gravel",
|
||||||
})
|
})
|
||||||
|
|
||||||
core.register_biome({
|
core.register_biome({
|
||||||
name = "land_moors",
|
name = "land_moors",
|
||||||
node_top = "jvmi_nodes:turf", depth_top = 1,
|
node_top = "jvmi_nodes:turf", depth_top = 1,
|
||||||
node_filler = "jvmi_nodes:dirt", depth_filler = 1,
|
node_filler = "jvmi_nodes:dirt", depth_filler = 1,
|
||||||
|
node_riverbed = "jvmi_nodes:gravel",
|
||||||
})
|
})
|
||||||
|
|
||||||
core.register_biome({
|
core.register_biome({
|
||||||
name = "land_mountains",
|
name = "land_mountains",
|
||||||
node_top = "jvmi_nodes:gravel", depth_top = 1,
|
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
|
local Region = jvmi.Region
|
||||||
|
|
||||||
|
|
||||||
|
-- Constants ---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local WATER_ID = core.get_content_id("jvmi_nodes:water_source")
|
||||||
|
|
||||||
|
|
||||||
-- Public ------------------------------------------------------------------------------------------
|
-- Public ------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
@@ -63,9 +68,16 @@ function private.fill_surface(region)
|
|||||||
while y >= region.fill_min.y do
|
while y >= region.fill_min.y do
|
||||||
if top_count > 0 then
|
if top_count > 0 then
|
||||||
local content_id = core.get_content_id(biome.node_top)
|
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
|
if content_id then
|
||||||
region:set_content_id(x, y, z, content_id)
|
region:set_content_id(x, y, z, content_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
top_count = top_count - 1
|
top_count = top_count - 1
|
||||||
elseif filler_count > 0 then
|
elseif filler_count > 0 then
|
||||||
local content_id = core.get_content_id(biome.node_filler)
|
local content_id = core.get_content_id(biome.node_filler)
|
||||||
|
|||||||
@@ -121,9 +121,9 @@ C.TERRAIN_TYPE_NOISE_PARAMS = {
|
|||||||
C.TERRAIN_TYPES = {
|
C.TERRAIN_TYPES = {
|
||||||
{ name = "ocean_floor", lowest = A.BEDROCK + 10, highest = A.BEDROCK + 26, weight = 5 },
|
{ 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_abyss", lowest = A.ABYSS, highest = A.DEEP, weight = 15 },
|
||||||
{ name = "ocean_shelf", lowest = A.DEEP, highest = A.SHALLOW, weight = 10 },
|
{ name = "ocean_shelf", lowest = A.DEEP, highest = A.SHALLOW, weight = 5 },
|
||||||
{ name = "ocean_surface", lowest = A.SURFACE - 4, highest = A.SURFACE, weight = 5 },
|
{ name = "ocean_surface", lowest = A.SURFACE - 4, highest = A.SURFACE + 4, weight = 10 },
|
||||||
{ name = "land_plains", lowest = A.PLAIN - 8, highest = A.PLAIN, weight = 20 },
|
{ 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_hills", lowest = A.HILL - 32, highest = A.HILL, weight = 25 },
|
||||||
{ name = "land_moors", lowest = A.MOOR - 16, highest = A.MOOR, weight = 15 },
|
{ name = "land_moors", lowest = A.MOOR - 16, highest = A.MOOR, weight = 15 },
|
||||||
{ name = "land_mountains", lowest = A.MOUNTAIN - 80, highest = A.MOUNTAIN, weight = 5 },
|
{ name = "land_mountains", lowest = A.MOUNTAIN - 80, highest = A.MOUNTAIN, weight = 5 },
|
||||||
|
|||||||
Reference in New Issue
Block a user