1
0
Fork 0

Generate deepslate instead of stone in low mg

This commit is contained in:
cora 2022-10-06 06:55:20 +02:00
parent cebd37cb00
commit 14ccfbc494
3 changed files with 31 additions and 22 deletions

View File

@ -36,7 +36,7 @@ end
-- nil, "void" -- nil, "void"
function mcl_worlds.y_to_layer(y) function mcl_worlds.y_to_layer(y)
if y >= mcl_vars.mg_overworld_min then 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 elseif y >= mcl_vars.mg_nether_min and y <= mcl_vars.mg_nether_max+128 then
return y - mcl_vars.mg_nether_min, "nether" return y - mcl_vars.mg_nether_min, "nether"
elseif y >= mcl_vars.mg_end_min and y <= mcl_vars.mg_end_max then elseif y >= mcl_vars.mg_end_min and y <= mcl_vars.mg_end_max then
@ -62,7 +62,7 @@ local pos_to_dimension = mcl_worlds.pos_to_dimension
-- 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 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

View File

@ -1517,11 +1517,21 @@ local function register_biomes()
name = biome .. "_underground", name = biome .. "_underground",
heat_point = minetest.registered_biomes[biome].heat_point, heat_point = minetest.registered_biomes[biome].heat_point,
humidity_point = minetest.registered_biomes[biome].humidity_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, y_max = DEEP_OCEAN_MIN - 1,
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type, _mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
_mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index, _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
end end

View File

@ -127,26 +127,25 @@ minetest.register_ore({
} }
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "blob", ore_type = "blob",
ore = "mcl_deepslate:deepslate", ore = "mcl_deepslate:deepslate",
wherein = { "mcl_core:stone" }, wherein = { "mcl_core:stone" },
clust_scarcity = 200, clust_scarcity = 200,
clust_num_ores = 100, clust_num_ores = 100,
clust_size = 10, clust_size = 10,
y_min = deepslate_min, y_min = mcl_vars.mg_overworld_min_old,
y_max = deepslate_max, y_max = deepslate_max,
noise_params = { noise_params = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = { x = 250, y = 250, z = 250 }, spread = { x = 250, y = 250, z = 250 },
seed = 12345, seed = 12345,
octaves = 3, octaves = 3,
persist = 0.6, persist = 0.6,
lacunarity = 2, lacunarity = 2,
flags = "defaults", flags = "defaults",
} }
}) })
minetest.register_ore({ minetest.register_ore({