From a36f3ba7d094b6fc2b423aff1a9620d308db092d Mon Sep 17 00:00:00 2001 From: kay27 Date: Wed, 19 Jan 2022 04:09:19 +0400 Subject: [PATCH] Cleanup again --- mods/CORE/mcl_worlds/init.lua | 2 +- mods/ITEMS/mcl_deepslate/init.lua | 42 +++++++++++++++---------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/mods/CORE/mcl_worlds/init.lua b/mods/CORE/mcl_worlds/init.lua index a5d247465..eb366013e 100644 --- a/mods/CORE/mcl_worlds/init.lua +++ b/mods/CORE/mcl_worlds/init.lua @@ -61,7 +61,7 @@ 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 + if not mc_dimension or mc_dimension == "overworld" then return layer + min1 elseif mc_dimension == "nether" then return layer + min3 diff --git a/mods/ITEMS/mcl_deepslate/init.lua b/mods/ITEMS/mcl_deepslate/init.lua index 55b8a5a79..7984ba89a 100644 --- a/mods/ITEMS/mcl_deepslate/init.lua +++ b/mods/ITEMS/mcl_deepslate/init.lua @@ -249,30 +249,30 @@ if minetest.settings:get_bool("mcl_generate_ores", true) then clust_size = size, y_min = y_min, y_max = y_max, - biomes = biomes, + biomes = biomes, }) end local ore_mapgen = { - { "coal", 1575, 5, 3, layer_min, layer_max }, - { "coal", 1530, 8, 3, layer_min, layer_max }, - { "coal", 1500, 12, 3, layer_min, layer_max }, - { "iron", 830, 5, 3, layer_min, layer_max }, - { "gold", 4775, 5, 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", 5000, 2, 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, 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", 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", 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", 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", 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) }, + { "coal" , 1575, 5, 3, layer_min , layer_max }, + { "coal" , 1530, 8, 3, layer_min , layer_max }, + { "coal" , 1500, 12, 3, layer_min , layer_max }, + { "iron" , 830, 5, 3, layer_min , layer_max }, + { "gold" , 4775, 5, 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" , 5000, 2, 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, 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", 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", 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" , 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" , 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) }, } 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])