From d5ff3f436a6b894b277e9a2a6f21696d56307d9f Mon Sep 17 00:00:00 2001 From: James David Clarke Date: Thu, 21 Dec 2023 09:23:03 +0000 Subject: [PATCH] Fixed ores not spawning --- _config.txt | 24 +++++++++++++++--------- init.lua | 7 ++++--- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/_config.txt b/_config.txt index 30633ab..80bf870 100644 --- a/_config.txt +++ b/_config.txt @@ -57,21 +57,27 @@ moreores.mithril_clust_size_deep = 3 if minetest.get_modpath("mcl_core") then -- Example adjustments for MineClone2 -moreores.tin_max_depth_high = 0 -moreores.tin_min_depth_high = -10 -moreores.tin_max_depth = 0 +moreores.tin_max_depth_high = 100 +moreores.tin_min_depth_high = -57 +moreores.tin_max_depth = 100 moreores.tin_min_depth = -57 +moreores.tin_max_depth_deep = 100 +moreores.tin_min_depth_deep = -57 -- Similar adjustments for silver and mithril -moreores.silver_max_depth_high = 0 -moreores.silver_min_depth_high = -10 -moreores.silver_max_depth = 0 +moreores.silver_max_depth_high = 100 +moreores.silver_min_depth_high = -57 +moreores.silver_max_depth = 100 moreores.silver_min_depth = -57 +moreores.silver_max_depth_deep = 100 +moreores.silver_min_depth_deep = -57 -moreores.mithril_max_depth_high = 0 -moreores.mithril_min_depth_high = -20 -moreores.mithril_max_depth = 0 +moreores.mithril_max_depth_high = 100 +moreores.mithril_min_depth_high = -57 +moreores.mithril_max_depth = 100 moreores.mithril_min_depth = -57 +moreores.mithril_max_depth_deep = 100 +moreores.mithril_min_depth_deep = -57 else -- Maximal and minimal depths of ore generation (Y coordinate, 0 being sea level by default) -- Tin diff --git a/init.lua b/init.lua index c63e9ce..0d6f70e 100644 --- a/init.lua +++ b/init.lua @@ -28,8 +28,9 @@ local use_frame = minetest.get_modpath("frame") local is_mcl_core_present = minetest.get_modpath("mcl_core") ~= nil local is_mcl_sounds_present = minetest.get_modpath("mcl_sounds") ~= nil local is_mcl_copper_present = minetest.registered_items["mcl_copper:copper_ingot"] ~= nil -local stone_ingrediant = mcl_core_modpath and "mcl_core:stone" or "default:stone" -local copper_ingrediant = mcl_core_modpath and "mcl_copper:copper_ingot" or 'default:copper_ingot' +local stone_ingrediant = is_mcl_core_present and "mcl_core:stone" or "default:stone" + +local copper_ingrediant = is_mcl_core_present and "mcl_copper:copper_ingot" or 'default:copper_ingot' local default_stone_sounds = nil local default_metal_sounds = nil @@ -215,7 +216,7 @@ local function add_ore(modname, description, mineral_name, oredef, extra_node_de oredef.oredef_deep.ore_type = "scatter" oredef.oredef_deep.ore = modname .. ":mineral_" .. mineral_name oredef.oredef_deep.wherein = stone_ingrediant - + minetest.register_ore(oredef.oredef_high) minetest.register_ore(oredef.oredef) minetest.register_ore(oredef.oredef_deep)