Cleanup again

This commit is contained in:
kay27 2022-01-19 04:09:19 +04:00
parent bc4cb14a76
commit a36f3ba7d0
2 changed files with 22 additions and 22 deletions

View File

@ -61,7 +61,7 @@ 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 not mc_dimension or mc_dimension == "overworld" then
return layer + min1 return layer + min1
elseif mc_dimension == "nether" then elseif mc_dimension == "nether" then
return layer + min3 return layer + min3

View File

@ -249,30 +249,30 @@ if minetest.settings:get_bool("mcl_generate_ores", true) then
clust_size = size, clust_size = size,
y_min = y_min, y_min = y_min,
y_max = y_max, y_max = y_max,
biomes = biomes, biomes = biomes,
}) })
end end
local ore_mapgen = { local ore_mapgen = {
{ "coal", 1575, 5, 3, layer_min, layer_max }, { "coal" , 1575, 5, 3, layer_min , layer_max },
{ "coal", 1530, 8, 3, layer_min, layer_max }, { "coal" , 1530, 8, 3, layer_min , layer_max },
{ "coal", 1500, 12, 3, layer_min, layer_max }, { "coal" , 1500, 12, 3, layer_min , layer_max },
{ "iron", 830, 5, 3, layer_min, layer_max }, { "iron" , 830, 5, 3, layer_min , layer_max },
{ "gold", 4775, 5, 3, layer_min, layer_max }, { "gold" , 4775, 5, 3, layer_min , layer_max },
{ "gold", 6560, 7, 3, layer_min, layer_max }, { "gold" , 6560, 7, 3, layer_min , layer_max },
{ "diamond", 10000, 4, 3, layer_min, mcl_worlds.layer_to_y(12) }, { "diamond" , 10000, 4, 3, layer_min , mcl_worlds.layer_to_y(12) },
{ "diamond", 5000, 2, 3, layer_min, mcl_worlds.layer_to_y(12) }, { "diamond" , 5000, 2, 3, layer_min , mcl_worlds.layer_to_y(12) },
{ "diamond", 10000, 8, 3, layer_min, mcl_worlds.layer_to_y(12) }, { "diamond" , 10000, 8, 3, layer_min , mcl_worlds.layer_to_y(12) },
{ "diamond", 20000, 1, 1, mcl_worlds.layer_to_y(13), mcl_worlds.layer_to_y(15) }, { "diamond" , 20000, 1, 1, mcl_worlds.layer_to_y(13), mcl_worlds.layer_to_y(15) },
{ "diamond", 20000, 2, 2, mcl_worlds.layer_to_y(13), mcl_worlds.layer_to_y(15) }, { "diamond" , 20000, 2, 2, mcl_worlds.layer_to_y(13), mcl_worlds.layer_to_y(15) },
{ "redstone", 500, 4, 3, layer_min, mcl_worlds.layer_to_y(13) }, { "redstone", 500, 4, 3, layer_min , mcl_worlds.layer_to_y(13) },
{ "redstone", 800, 7, 4, layer_min, mcl_worlds.layer_to_y(13) }, { "redstone", 800, 7, 4, layer_min , mcl_worlds.layer_to_y(13) },
{ "redstone", 1000, 4, 3, mcl_worlds.layer_to_y(13), mcl_worlds.layer_to_y(15) }, { "redstone", 1000, 4, 3, mcl_worlds.layer_to_y(13), mcl_worlds.layer_to_y(15) },
{ "redstone", 1600, 7, 4, mcl_worlds.layer_to_y(13), mcl_worlds.layer_to_y(15) }, { "redstone", 1600, 7, 4, mcl_worlds.layer_to_y(13), mcl_worlds.layer_to_y(15) },
{ "lapis", 10000, 7, 4, mcl_worlds.layer_to_y(14), layer_max }, { "lapis" , 10000, 7, 4, mcl_worlds.layer_to_y(14), layer_max },
{ "lapis", 12000, 6, 3, mcl_worlds.layer_to_y(10), mcl_worlds.layer_to_y(13) }, { "lapis" , 12000, 6, 3, mcl_worlds.layer_to_y(10), mcl_worlds.layer_to_y(13) },
{ "lapis", 14000, 5, 3, mcl_worlds.layer_to_y(6), mcl_worlds.layer_to_y(9) }, { "lapis" , 14000, 5, 3, mcl_worlds.layer_to_y(6) , mcl_worlds.layer_to_y(9) },
{ "lapis", 16000, 4, 3, mcl_worlds.layer_to_y(2), mcl_worlds.layer_to_y(5) }, { "lapis" , 16000, 4, 3, mcl_worlds.layer_to_y(2) , mcl_worlds.layer_to_y(5) },
{ "lapis", 18000, 3, 2, mcl_worlds.layer_to_y(0), mcl_worlds.layer_to_y(2) }, { "lapis" , 18000, 3, 2, mcl_worlds.layer_to_y(0) , mcl_worlds.layer_to_y(2) },
} }
for _, o in pairs(ore_mapgen) do for _, o in pairs(ore_mapgen) do
register_ore_mg("mcl_deepslate:deepslate_with_"..o[1], o[2], o[3], o[4], o[5], o[6]) register_ore_mg("mcl_deepslate:deepslate_with_"..o[1], o[2], o[3], o[4], o[5], o[6])