forked from VoxeLibre/VoxeLibre
Add biome
This commit is contained in:
parent
76025b5681
commit
fa73fa76cf
|
@ -125,6 +125,7 @@ local function register_biomes()
|
||||||
"MesaBryce",
|
"MesaBryce",
|
||||||
"MesaPlateauF",
|
"MesaPlateauF",
|
||||||
"MesaPlateauFM",
|
"MesaPlateauFM",
|
||||||
|
"LushCaves",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Ice Plains Spikes (rare)
|
-- Ice Plains Spikes (rare)
|
||||||
|
@ -1440,6 +1441,42 @@ local function register_biomes()
|
||||||
_mcl_palette_index = 29,
|
_mcl_palette_index = 29,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_biome({
|
||||||
|
name = "LushCaves",
|
||||||
|
node_top = "mcl_core:dirt_with_grass",
|
||||||
|
depth_top = 1,
|
||||||
|
node_filler = "mcl_core:dirt",
|
||||||
|
depth_filler = 3,
|
||||||
|
node_riverbed = "mcl_core:sand",
|
||||||
|
node_cave_liquid = "mcl_core:water_source",
|
||||||
|
depth_riverbed = 2,
|
||||||
|
y_min = 4,
|
||||||
|
y_max = 5,
|
||||||
|
vertical_blend = 1,
|
||||||
|
humidity_point = 83,
|
||||||
|
heat_point = 55,
|
||||||
|
_mcl_biome_type = "medium",
|
||||||
|
_mcl_palette_index = 28,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_biome({
|
||||||
|
name = "LushCaves_ocean",
|
||||||
|
node_top = "mcl_core:sand",
|
||||||
|
depth_top = 1,
|
||||||
|
node_filler = "mcl_core:sand",
|
||||||
|
depth_filler = 3,
|
||||||
|
node_riverbed = "mcl_core:sand",
|
||||||
|
node_cave_liquid = "mcl_core:water_source",
|
||||||
|
depth_riverbed = 2,
|
||||||
|
y_min = OCEAN_MIN,
|
||||||
|
y_max = -6,
|
||||||
|
vertical_blend = 1,
|
||||||
|
humidity_point = 83,
|
||||||
|
heat_point = 57,
|
||||||
|
_mcl_biome_type = "medium",
|
||||||
|
_mcl_palette_index = 28,
|
||||||
|
})
|
||||||
|
|
||||||
-- Add deep ocean and underground biomes automatically.
|
-- Add deep ocean and underground biomes automatically.
|
||||||
for i=1, #overworld_biomes do
|
for i=1, #overworld_biomes do
|
||||||
local biome = overworld_biomes[i]
|
local biome = overworld_biomes[i]
|
||||||
|
@ -3906,6 +3943,113 @@ local function register_decorations()
|
||||||
register_flower("allium", nil, 0) -- flower Forest only
|
register_flower("allium", nil, 0) -- flower Forest only
|
||||||
register_flower("blue_orchid", {"Swampland"}, 64500, false)
|
register_flower("blue_orchid", {"Swampland"}, 64500, false)
|
||||||
|
|
||||||
|
--Lush Caves
|
||||||
|
local lushcaves = { "LushCaves_underground", "LushCaves_ocean", "LushCaves_deep_ocean"}
|
||||||
|
minetest.register_decoration({
|
||||||
|
decoration = "mcl_lush_caves:moss",
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"group:material_stone", "mcl_core:gravel", "mcl_core:bedrock"},
|
||||||
|
spawn_by = {"air"},
|
||||||
|
num_spawn_by = 4,
|
||||||
|
sidelen = 80,
|
||||||
|
y_max = 1,
|
||||||
|
biomes = lushcaves,
|
||||||
|
fill_ratio = 10,
|
||||||
|
flags = "place_center_x, place_center_z, force_placement, all_floors, all_ceilings",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
|
decoration = "mcl_flowers:tallgrass",
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"mcl_lush_caves:moss"},
|
||||||
|
spawn_by = {"air"},
|
||||||
|
num_spawn_by = 4,
|
||||||
|
sidelen = 16,
|
||||||
|
y_max = 10,
|
||||||
|
biomes = lushcaves,
|
||||||
|
fill_ratio = 8,
|
||||||
|
flags = "place_center_x, place_center_z, force_placement, all_floors",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
|
decoration = "mcl_lush_caves:lake_structblock",
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"group:material_stone","mcl_core:gravel","mcl_lush_caves:moss","mcl_core:clay"},
|
||||||
|
spawn_by = {"air"},
|
||||||
|
num_spawn_by = 4,
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 10,
|
||||||
|
flags = "place_center_x, place_center_z, force_placement, all_floors",
|
||||||
|
biomes = lushcaves,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
|
decoration = "mcl_lush_caves:cave_vines",
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"mcl_lush_caves:moss"},
|
||||||
|
height = 1,
|
||||||
|
max_height = 4,
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 1,
|
||||||
|
flags = "place_center_x, place_center_z, force_placement, all_ceilings",
|
||||||
|
biomes = lushcaves,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
|
decoration = "mcl_lush_caves:rooted_dirt",
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"group:material_stone"},
|
||||||
|
spawn_by = {"air"},
|
||||||
|
num_spawn_by = 4,
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 10,
|
||||||
|
flags = "place_center_x, place_center_z, force_placement, all_ceilings",
|
||||||
|
biomes = lushcaves,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
|
decoration = "mcl_lush_caves:hanging_roots",
|
||||||
|
deco_type = "simple",
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 10,
|
||||||
|
flags = "place_center_x, place_center_z, force_placement, all_ceilings",
|
||||||
|
biomes = lushcaves,
|
||||||
|
})
|
||||||
|
--[[
|
||||||
|
minetest.register_decoration({
|
||||||
|
decoration = "mcl_lush_caves:spore_blossom",
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"mcl_lush_caves:moss","group:material_stone"},
|
||||||
|
spawn_by = {"air"},
|
||||||
|
num_spawn_by = 4,
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 0,
|
||||||
|
flags = "place_center_x, place_center_z, force_placement, all_ceilings",
|
||||||
|
biomes = { "LushCaves_underground", "LushCaves_ocean", "LushCaves_deep_ocean" },
|
||||||
|
})--]]
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
|
decoration = "mcl_lush_caves:moss_carpet",
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"group:material_stone","mcl_core:gravel","mcl_lush_caves:moss"},
|
||||||
|
spawn_by = {"air"},
|
||||||
|
num_spawn_by = 4,
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 0.01,
|
||||||
|
flags = "place_center_x, place_center_z, force_placement, all_floors",
|
||||||
|
biomes = lushcaves,
|
||||||
|
})
|
||||||
|
--[[]
|
||||||
|
minetest.register_decoration({
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = "mcl_lush_caves:moss","mcl_core:clay",
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 5,
|
||||||
|
biomes = lushcaves,
|
||||||
|
decoration = "mcl_flowers:tallgrass",
|
||||||
|
flags = "place_center_x, place_center_z, force_placement, all_floors",
|
||||||
|
})
|
||||||
|
--]]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Decorations in non-Overworld dimensions
|
-- Decorations in non-Overworld dimensions
|
||||||
|
|
|
@ -16,18 +16,15 @@ local vector_distance_xz = function(a, b)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function makelake(pos)
|
local function makelake(pos)
|
||||||
local p1 = vector.offset(pos,-5,-10,-5)
|
local p1 = vector.offset(pos,-5,-2,-5)
|
||||||
local p2 = vector.offset(pos,5,10,5)
|
local p2 = vector.offset(pos,5,1,5)
|
||||||
local nn = minetest.find_nodes_in_area_under_air(p1,p2,{"group:stone","mcl_lush_caves:moss"})
|
local nn = minetest.find_nodes_in_area_under_air(p1,p2,{"group:material_stone","mcl_core:clay"})
|
||||||
table.sort(nn,function(a, b)
|
table.sort(nn,function(a, b)
|
||||||
return vector_distance_xz(pos, a) < vector_distance_xz(pos, b)
|
return vector_distance_xz(pos, a) < vector_distance_xz(pos, b)
|
||||||
end)
|
end)
|
||||||
if not nn[1] then return end
|
if not nn[1] then return end
|
||||||
local y = nn[1].y
|
|
||||||
for i=1,math.random(#nn) do
|
for i=1,math.random(#nn) do
|
||||||
if nn[i].y == y then
|
minetest.set_node(nn[i],{name="mcl_core:water_source"})
|
||||||
minetest.set_node(nn[i],{name="mcl_core:water_source"})
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
local nnn = minetest.find_nodes_in_area_under_air(p1,p2,{"mcl_core:water_source","group:water"})
|
local nnn = minetest.find_nodes_in_area_under_air(p1,p2,{"mcl_core:water_source","group:water"})
|
||||||
for k,v in pairs(nnn) do
|
for k,v in pairs(nnn) do
|
||||||
|
@ -36,8 +33,8 @@ local function makelake(pos)
|
||||||
local an = minetest.get_node(pp)
|
local an = minetest.get_node(pp)
|
||||||
if an.name ~= "mcl_core:water_source" then
|
if an.name ~= "mcl_core:water_source" then
|
||||||
minetest.set_node(pp,{name="mcl_core:clay"})
|
minetest.set_node(pp,{name="mcl_core:clay"})
|
||||||
if pr:next(1,10) == 1 then
|
if pr:next(1,20) == 1 then
|
||||||
minetest.set_node(vector.offset(pp,0,1,0),{name="mcl_lush_caves:moss_carpet"})
|
minetest.set_node(vector.offset(pp,0,1,0),{name="mcl_lush_caves:moss_carpet"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -53,7 +50,7 @@ minetest.register_node("mcl_lush_caves:moss", {
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
tiles = {"mcl_lush_caves_moss_block.png"},
|
tiles = {"mcl_lush_caves_moss_block.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {handy=1, hoey=2, dirt=1, soil=1, soil_sapling=2, enderman_takable=1, building_block=1,flammable=1,fire_encouragement=60, fire_flammability=20},
|
groups = {handy=1, hoey=2, dirt=1, soil=1, soil_sapling=2, enderman_takable=1, building_block=1,flammable=1,fire_encouragement=60, fire_flammability=20, grass_block_no_snow = 1 },
|
||||||
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
||||||
_mcl_blast_resistance = 0.1,
|
_mcl_blast_resistance = 0.1,
|
||||||
_mcl_hardness = 0.1,
|
_mcl_hardness = 0.1,
|
||||||
|
@ -68,7 +65,7 @@ minetest.register_node("mcl_lush_caves:moss_carpet", {
|
||||||
tiles = {"mcl_lush_caves_moss_carpet.png"},
|
tiles = {"mcl_lush_caves_moss_carpet.png"},
|
||||||
wield_image ="mcl_lush_caves_moss_carpet.png",
|
wield_image ="mcl_lush_caves_moss_carpet.png",
|
||||||
wield_scale = { x=1, y=1, z=0.5 },
|
wield_scale = { x=1, y=1, z=0.5 },
|
||||||
groups = {handy=1, carpet=1,supported_node=1,flammable=1,fire_encouragement=60, fire_flammability=20, deco_block=1},--dig_by_water=1,
|
groups = {handy=1, carpet=1,supported_node=1,flammable=1,fire_encouragement=60, fire_flammability=20, deco_block=1, dig_by_water=1 },
|
||||||
sounds = mcl_sounds.node_sound_wool_defaults(),
|
sounds = mcl_sounds.node_sound_wool_defaults(),
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -302,9 +299,9 @@ minetest.register_node("mcl_lush_caves:spore_blossom", {
|
||||||
description = S("Spore blossom"),
|
description = S("Spore blossom"),
|
||||||
_doc_items_longdesc = S("Spore blossom"),
|
_doc_items_longdesc = S("Spore blossom"),
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
tiles = {"mcl_lush_caves_spore_blossom.png","mcl_lush_caves_spore_blossom.png"},
|
tiles = {"mcl_lush_caves_spore_blossom.png"},
|
||||||
drawtype = "plantlike_rooted",
|
drawtype = "plantlike",
|
||||||
param2type = "wallmounted",
|
param2type = "light",
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {handy = 1, plant = 1},
|
groups = {handy = 1, plant = 1},
|
||||||
|
@ -324,86 +321,13 @@ minetest.register_craftitem("mcl_lush_caves:glow_berry", {
|
||||||
_mcl_saturation = 1.2,
|
_mcl_saturation = 1.2,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
decoration = "mcl_lush_caves:moss",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = {"group:stone","mcl_core:gravel"},
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.5,
|
|
||||||
flags = "place_center_x, place_center_z, force_placement, all_floors, all_ceilings",
|
|
||||||
--biomes = get_ocean_biomes(),
|
|
||||||
y_max=-10,
|
|
||||||
})
|
|
||||||
minetest.register_decoration({
|
|
||||||
decoration = "mcl_lush_caves:moss_carpet",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = {"group:stone","mcl_core:gravel"},
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.5,
|
|
||||||
flags = "place_center_x, place_center_z, force_placement, all_floors",
|
|
||||||
--biomes = get_ocean_biomes(),
|
|
||||||
y_max=-10,
|
|
||||||
})
|
|
||||||
minetest.register_decoration({
|
|
||||||
decoration = "mcl_lush_caves:rooted_dirt",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = {"group:stone","mcl_core:gravel"},
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.3,
|
|
||||||
flags = "place_center_x, place_center_z, force_placement, all_ceilings",
|
|
||||||
--biomes = get_ocean_biomes(),
|
|
||||||
y_max=-10,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
decoration = "mcl_lush_caves:hanging_roots",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = {"mcl_lush_caves:rooted_dirt",},
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.1,
|
|
||||||
flags = "place_center_x, place_center_z, force_placement, all_ceilings",
|
|
||||||
--biomes = get_ocean_biomes(),
|
|
||||||
y_max=-10,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
decoration = "mcl_lush_caves:spore_blossom",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = {"mcl_lush_caves:moss","group:material_stone"},
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.1,
|
|
||||||
flags = "place_center_x, place_center_z, force_placement, all_ceilings",
|
|
||||||
--biomes = get_ocean_biomes(),
|
|
||||||
y_max=-10,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
decoration = "mcl_lush_caves:cave_vines",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = {"mcl_lush_caves:moss"},
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.1,
|
|
||||||
flags = "place_center_x, place_center_z, force_placement, all_ceilings",
|
|
||||||
--biomes = get_ocean_biomes(),
|
|
||||||
y_max=-10,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
decoration = "mcl_lush_caves:lake_structblock",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = {"group:stone","mcl_core:gravel","mcl_lush_caves:moss"},
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.1,
|
|
||||||
flags = "place_center_x, place_center_z, force_placement, all_floors",
|
|
||||||
--biomes = get_ocean_biomes(),
|
|
||||||
y_max=-10,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
label = "Cave vines grow",
|
label = "Cave vines grow",
|
||||||
nodenames = {"mcl_lush_caves:cave_vines_lit","mcl_lush_caves:cave_vines"},
|
nodenames = {"mcl_lush_caves:cave_vines_lit","mcl_lush_caves:cave_vines"},
|
||||||
interval = 5,
|
interval = 180,
|
||||||
chance = 2,
|
chance = 5,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
local pu = vector.offset(pos,0,1,0)
|
local pu = vector.offset(pos,0,1,0)
|
||||||
local pun = minetest.get_node(pu).name
|
local pun = minetest.get_node(pu).name
|
||||||
|
@ -422,7 +346,6 @@ minetest.register_abm({
|
||||||
else
|
else
|
||||||
minetest.set_node(pos,{name="mcl_lush_caves:cave_vines_lit"})
|
minetest.set_node(pos,{name="mcl_lush_caves:cave_vines_lit"})
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue