forked from VoxeLibre/VoxeLibre
Compare commits
11 Commits
master
...
lower_ow_m
Author | SHA1 | Date |
---|---|---|
FossFanatic | 632ad1ca18 | |
cora | 1add2793df | |
cora | 9aef6b8ee3 | |
Freedom | 633d7a2fe1 | |
cora | 1c09490ba3 | |
cora | 14ccfbc494 | |
cora | cebd37cb00 | |
cora | 30eecae708 | |
cora | b61641c0ca | |
cora | 20ee4d3bdd | |
cora | 64fe5b34c6 |
|
@ -26,10 +26,12 @@ mcl_vars.tool_wield_scale = { x = 1.8, y = 1.8, z = 1 }
|
|||
|
||||
-- Mapgen variables
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
local minecraft_height_limit = 256
|
||||
local minecraft_height_limit = 320
|
||||
local superflat = mg_name == "flat" and minetest.get_mapgen_setting("mcl_superflat_classic") == "true"
|
||||
local singlenode = mg_name == "singlenode"
|
||||
|
||||
local convert_old_bedrock = minetest.settings:get_bool("mcl_convert_old_bedrock", true)
|
||||
|
||||
-- Calculate mapgen_edge_min/mapgen_edge_max
|
||||
mcl_vars.chunksize = math.max(1, tonumber(minetest.get_mapgen_setting("chunksize")) or 5)
|
||||
mcl_vars.MAP_BLOCKSIZE = math.max(1, minetest.MAP_BLOCKSIZE or 16)
|
||||
|
@ -99,7 +101,10 @@ if not superflat and not singlenode then
|
|||
]]
|
||||
|
||||
-- Overworld
|
||||
mcl_vars.mg_overworld_min = -62
|
||||
local mg_overworld_min_default = -128
|
||||
mcl_vars.mg_overworld_min_old = -62
|
||||
mcl_vars.mg_overworld_min = tonumber(minetest.settings:get("mcl_overworld_min")) or mg_overworld_min_default
|
||||
|
||||
mcl_vars.mg_overworld_max_official = mcl_vars.mg_overworld_min + minecraft_height_limit
|
||||
mcl_vars.mg_bedrock_overworld_min = mcl_vars.mg_overworld_min
|
||||
mcl_vars.mg_bedrock_overworld_max = mcl_vars.mg_bedrock_overworld_min + 4
|
||||
|
@ -108,7 +113,8 @@ if not superflat and not singlenode then
|
|||
mcl_vars.mg_bedrock_is_rough = true
|
||||
|
||||
elseif singlenode then
|
||||
mcl_vars.mg_overworld_min = -66
|
||||
mcl_vars.mg_overworld_min_old = -66
|
||||
mcl_vars.mg_overworld_min = -130
|
||||
mcl_vars.mg_overworld_max_official = mcl_vars.mg_overworld_min + minecraft_height_limit
|
||||
mcl_vars.mg_bedrock_overworld_min = mcl_vars.mg_overworld_min
|
||||
mcl_vars.mg_bedrock_overworld_max = mcl_vars.mg_bedrock_overworld_min
|
||||
|
@ -262,3 +268,57 @@ function mcl_vars.get_node(p, force, us_timeout)
|
|||
return node
|
||||
-- it still can return "ignore", LOL, even if force = true, but only after time out
|
||||
end
|
||||
|
||||
-- Abm to update from old mapgen depth to new. potentially affects a lot of nodes inducing lag.
|
||||
-- Also it will not generate ores or bedrock pattern.
|
||||
|
||||
local adjacents = {
|
||||
vector.new(1,0,0),
|
||||
vector.new(0,1,0),
|
||||
vector.new(0,0,1),
|
||||
vector.new(-1,0,0),
|
||||
vector.new(0,-1,0),
|
||||
vector.new(0,0,-1),
|
||||
}
|
||||
local function register_abms()
|
||||
minetest.register_abm({
|
||||
label = "Replace bedrock from old bedrock layer and air/void below to deepslate",
|
||||
name = ":mcl_mapgen_core:replace_old_void",
|
||||
nodenames = { "mcl_core:void" },
|
||||
chance = 1,
|
||||
interval = 5,
|
||||
min_y = mcl_vars.mg_bedrock_overworld_max,
|
||||
max_y = mcl_vars.mg_overworld_min_old,
|
||||
action = function(p)
|
||||
minetest.log("void")
|
||||
if p.y > mcl_vars.mg_overworld_min_old - 5 then
|
||||
minetest.bulk_set_node(minetest.find_nodes_in_area(vector.new(p.x-5,mcl_vars.mg_overworld_min_old-5,p.z-5),vector.new(p.x+5,mcl_vars.mg_overworld_min_old,p.z+5),{"mcl_core:void"}),{name="mcl_deepslate:deepslate"})
|
||||
else
|
||||
minetest.after(0,function(p)
|
||||
if minetest.get_node(p).name == "mcl_core:void" then
|
||||
minetest.delete_area(p,p)
|
||||
end
|
||||
end,p)
|
||||
end
|
||||
end
|
||||
})
|
||||
minetest.register_abm({
|
||||
label = "Replace bedrock from old bedrock layer and air/void below to deepslate",
|
||||
name = ":mcl_mapgen_core:replace_old_bedrock",
|
||||
nodenames = { "mcl_core:bedrock" },
|
||||
chance = 5,
|
||||
interval = 5,
|
||||
min_y = mcl_vars.mg_overworld_min_old,
|
||||
max_y = mcl_vars.mg_overworld_min_old + 4,
|
||||
action = function(p)
|
||||
minetest.log("bedr")
|
||||
if minetest.find_node_near(p,24,{"mcl_core:void"}) then
|
||||
return
|
||||
end
|
||||
minetest.bulk_set_node(minetest.find_nodes_in_area(vector.new(p.x-5,mcl_vars.mg_overworld_min_old-1,p.z-5),vector.new(p.x+5,mcl_vars.mg_overworld_min_old+5,p.z+5),{"mcl_core:bedrock",}),{name="mcl_deepslate:deepslate"})
|
||||
end
|
||||
})
|
||||
end
|
||||
if convert_old_bedrock then
|
||||
register_abms()
|
||||
end
|
||||
|
|
|
@ -36,7 +36,7 @@ end
|
|||
-- nil, "void"
|
||||
function mcl_worlds.y_to_layer(y)
|
||||
if y >= mcl_vars.mg_overworld_min then
|
||||
return y - mcl_vars.mg_overworld_min, "overworld"
|
||||
return y - mcl_vars.mg_overworld_min_old, "overworld"
|
||||
elseif y >= mcl_vars.mg_nether_min and y <= mcl_vars.mg_nether_max+128 then
|
||||
return y - mcl_vars.mg_nether_min, "nether"
|
||||
elseif y >= mcl_vars.mg_end_min and y <= mcl_vars.mg_end_max then
|
||||
|
@ -61,13 +61,13 @@ local pos_to_dimension = mcl_worlds.pos_to_dimension
|
|||
-- MineClone 2.
|
||||
-- mc_dimension is one of "overworld", "nether", "end" (default: "overworld").
|
||||
function mcl_worlds.layer_to_y(layer, mc_dimension)
|
||||
if mc_dimension == "overworld" or mc_dimension == nil then
|
||||
return layer + mcl_vars.mg_overworld_min
|
||||
elseif mc_dimension == "nether" then
|
||||
return layer + mcl_vars.mg_nether_min
|
||||
elseif mc_dimension == "end" then
|
||||
return layer + mcl_vars.mg_end_min
|
||||
end
|
||||
if mc_dimension == "overworld" or mc_dimension == nil then
|
||||
return layer + mcl_vars.mg_overworld_min_old
|
||||
elseif mc_dimension == "nether" then
|
||||
return layer + mcl_vars.mg_nether_min
|
||||
elseif mc_dimension == "end" then
|
||||
return layer + mcl_vars.mg_end_min
|
||||
end
|
||||
end
|
||||
|
||||
-- Takes a position and returns true if this position can have weather
|
||||
|
|
|
@ -42,7 +42,7 @@ local function register_drop(liquid, glow, sound, nodes, interval, chance)
|
|||
--with longer abm cycles
|
||||
table.shuffle(nn)
|
||||
for i=1,math.random(#nn) do
|
||||
if minetest.get_item_group(minetest.get_node(vector.offset(nn[i], 0, 1, 0)).name, liquid) ~= 0
|
||||
if nn[i] and minetest.get_item_group(minetest.get_node(vector.offset(nn[i], 0, 1, 0)).name, liquid) ~= 0
|
||||
and minetest.get_node(vector.offset(nn[i], 0, -1, 0)).name == "air" then
|
||||
make_drop(nn[i],liquid,sound,interval)
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
local mt_sound_play = minetest.sound_play
|
||||
|
||||
local spread_to = {"mcl_core:stone","mcl_core:dirt","mcl_core:sand","mcl_core:dirt_with_grass","group:grass_block","mcl_core:andesite","mcl_core:diorite","mcl_core:granite","mcl_core:mycelium","group:dirt","mcl_end:end_stone","mcl_nether:netherrack","mcl_blackstone:basalt","mcl_nether:soul_sand","mcl_blackstone:soul_soil","mcl_crimson:warped_nylium","mcl_crimson:crimson_nylium","mcl_core:gravel"}
|
||||
local spread_to = {"mcl_core:stone","mcl_core:dirt","mcl_core:sand","mcl_core:dirt_with_grass","group:grass_block","mcl_core:andesite","mcl_core:diorite","mcl_core:granite","mcl_core:mycelium","group:dirt","mcl_end:end_stone","mcl_nether:netherrack","mcl_blackstone:basalt","mcl_nether:soul_sand","mcl_blackstone:soul_soil","mcl_crimson:warped_nylium","mcl_crimson:crimson_nylium","mcl_core:gravel","mcl_deepslate:deepslate","mcl_deepslate:tuff"}
|
||||
|
||||
local sounds = {
|
||||
footstep = {name = "mcl_sculk_block", },
|
||||
|
|
|
@ -1095,7 +1095,6 @@ local function register_biomes()
|
|||
_mcl_palette_index = 22,
|
||||
})
|
||||
|
||||
|
||||
-- Savanna
|
||||
minetest.register_biome({
|
||||
name = "Savanna",
|
||||
|
@ -1489,6 +1488,33 @@ local function register_biomes()
|
|||
_mcl_palette_index = 29,
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "DeepDark",
|
||||
node_top = "mcl_sculk:sculk",
|
||||
depth_top = 1,
|
||||
node_filler = "mcl_deepslate:deepslate",
|
||||
node_riverbed = "mcl_deepslate:deepslate",
|
||||
depth_riverbed = 1,
|
||||
node_stone = "mcl_deepslate:deepslate",
|
||||
y_min = mcl_vars.mg_overworld_min,
|
||||
y_max = mcl_vars.mg_overworld_min_old,
|
||||
humidity_point = 0,
|
||||
heat_point = 60,
|
||||
vertical_blend = 8,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_palette_index = 21,
|
||||
})
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"group:material_stone","mcl_deepslate:deepslate"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 10,
|
||||
biomes = { "DeepDark" },
|
||||
decoration = "mcl_sculk:sculk",
|
||||
flags = "all_floors",
|
||||
param2 = 0,
|
||||
})
|
||||
|
||||
-- Add deep ocean and underground biomes automatically.
|
||||
for i=1, #overworld_biomes do
|
||||
local biome = overworld_biomes[i]
|
||||
|
@ -1517,11 +1543,21 @@ local function register_biomes()
|
|||
name = biome .. "_underground",
|
||||
heat_point = minetest.registered_biomes[biome].heat_point,
|
||||
humidity_point = minetest.registered_biomes[biome].humidity_point,
|
||||
y_min = mcl_vars.mg_overworld_min,
|
||||
y_min = mcl_vars.mg_overworld_min_old,
|
||||
y_max = DEEP_OCEAN_MIN - 1,
|
||||
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
|
||||
_mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index,
|
||||
})
|
||||
minetest.register_biome({
|
||||
name = biome .. "_deep_underground",
|
||||
heat_point = minetest.registered_biomes[biome].heat_point,
|
||||
humidity_point = minetest.registered_biomes[biome].humidity_point,
|
||||
node_stone = "mcl_deepslate:deepslate",
|
||||
y_min = mcl_vars.mg_overworld_min,
|
||||
y_max = mcl_vars.mg_overworld_min_old,
|
||||
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
|
||||
_mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index,
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -2753,6 +2789,16 @@ local function register_coral_decos(ck)
|
|||
end
|
||||
|
||||
local function register_decorations()
|
||||
--Deep Dark
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"mcl_sculk:sculk"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.1,
|
||||
decoration = "mcl_sculk:catalyst",
|
||||
biomes = {"DeepDark"},
|
||||
flags = "all_floors",
|
||||
})
|
||||
-- Coral Reefs
|
||||
for k,_ in pairs(corals) do
|
||||
register_coral_decos(k)
|
||||
|
|
|
@ -127,26 +127,25 @@ minetest.register_ore({
|
|||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "mcl_deepslate:deepslate",
|
||||
wherein = { "mcl_core:stone" },
|
||||
clust_scarcity = 200,
|
||||
clust_num_ores = 100,
|
||||
clust_size = 10,
|
||||
y_min = deepslate_min,
|
||||
y_max = deepslate_max,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = { x = 250, y = 250, z = 250 },
|
||||
seed = 12345,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
lacunarity = 2,
|
||||
flags = "defaults",
|
||||
}
|
||||
ore_type = "blob",
|
||||
ore = "mcl_deepslate:deepslate",
|
||||
wherein = { "mcl_core:stone" },
|
||||
clust_scarcity = 200,
|
||||
clust_num_ores = 100,
|
||||
clust_size = 10,
|
||||
y_min = mcl_vars.mg_overworld_min_old,
|
||||
y_max = deepslate_max,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = { x = 250, y = 250, z = 250 },
|
||||
seed = 12345,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
lacunarity = 2,
|
||||
flags = "defaults",
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
|
|
|
@ -49,7 +49,7 @@ local function init_strongholds()
|
|||
if superflat then
|
||||
y = mcl_vars.mg_bedrock_overworld_max + 3
|
||||
else
|
||||
y = pr:next(mcl_vars.mg_bedrock_overworld_max+1, mcl_vars.mg_overworld_min+48)
|
||||
y = pr:next(-50, -30)
|
||||
end
|
||||
local pos = { x = math.cos(angle) * dist, y = y, z = math.sin(angle) * dist }
|
||||
pos = vector.round(pos)
|
||||
|
|
|
@ -136,6 +136,9 @@ mcl_default_shadow_intensity (Default shadow intensity) float 0.33 0.0 1.0
|
|||
# See also: https://github.com/minetest/minetest/issues/95
|
||||
mcl_translucent_ice (Translucent ice) bool false
|
||||
|
||||
# Overworld min deep (default: -128)
|
||||
mcl_overworld_min (Overworld min deep) int -128 -25000 -62
|
||||
|
||||
# Whether to generate fallen logs in some biomes.
|
||||
# They might not always look pretty and have strange overhangs.
|
||||
mcl_generate_fallen_logs (Generate fallen logs) bool false
|
||||
|
|
Loading…
Reference in New Issue