Make overworld_min configurable

This commit is contained in:
Freedom 2022-10-06 07:25:16 +02:00 committed by cora
parent 1c09490ba3
commit 633d7a2fe1
5 changed files with 14 additions and 10 deletions

View File

@ -101,8 +101,10 @@ if not superflat and not singlenode then
]] ]]
-- Overworld -- Overworld
local mg_overworld_min_default = -128
mcl_vars.mg_overworld_min_old = -62 mcl_vars.mg_overworld_min_old = -62
mcl_vars.mg_overworld_min = -128 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_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_min = mcl_vars.mg_overworld_min
mcl_vars.mg_bedrock_overworld_max = mcl_vars.mg_bedrock_overworld_min + 4 mcl_vars.mg_bedrock_overworld_max = mcl_vars.mg_bedrock_overworld_min + 4

View File

@ -61,13 +61,13 @@ local pos_to_dimension = mcl_worlds.pos_to_dimension
-- MineClone 2. -- MineClone 2.
-- mc_dimension is one of "overworld", "nether", "end" (default: "overworld"). -- mc_dimension is one of "overworld", "nether", "end" (default: "overworld").
function mcl_worlds.layer_to_y(layer, mc_dimension) function mcl_worlds.layer_to_y(layer, mc_dimension)
if mc_dimension == "overworld" or mc_dimension == nil then if mc_dimension == "overworld" or mc_dimension == nil then
return layer + mcl_vars.mg_overworld_min_old return layer + mcl_vars.mg_overworld_min_old
elseif mc_dimension == "nether" then elseif mc_dimension == "nether" then
return layer + mcl_vars.mg_nether_min return layer + mcl_vars.mg_nether_min
elseif mc_dimension == "end" then elseif mc_dimension == "end" then
return layer + mcl_vars.mg_end_min return layer + mcl_vars.mg_end_min
end end
end end
-- Takes a position and returns true if this position can have weather -- Takes a position and returns true if this position can have weather

View File

@ -1095,7 +1095,6 @@ local function register_biomes()
_mcl_palette_index = 22, _mcl_palette_index = 22,
}) })
-- Savanna -- Savanna
minetest.register_biome({ minetest.register_biome({
name = "Savanna", name = "Savanna",

View File

@ -49,7 +49,7 @@ local function init_strongholds()
if superflat then if superflat then
y = mcl_vars.mg_bedrock_overworld_max + 3 y = mcl_vars.mg_bedrock_overworld_max + 3
else else
y = pr:next(mcl_vars.mg_bedrock_overworld_max+1, mcl_vars.mg_overworld_min+48) y = pr:next(-50, -30)
end end
local pos = { x = math.cos(angle) * dist, y = y, z = math.sin(angle) * dist } local pos = { x = math.cos(angle) * dist, y = y, z = math.sin(angle) * dist }
pos = vector.round(pos) pos = vector.round(pos)

View File

@ -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 # See also: https://github.com/minetest/minetest/issues/95
mcl_translucent_ice (Translucent ice) bool false 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. # Whether to generate fallen logs in some biomes.
# They might not always look pretty and have strange overhangs. # They might not always look pretty and have strange overhangs.
mcl_generate_fallen_logs (Generate fallen logs) bool false mcl_generate_fallen_logs (Generate fallen logs) bool false