Add setting to dissable ores generation #874

This commit is contained in:
AFCMS 2021-02-22 12:33:28 +00:00
parent 2d0612fa81
commit 0e6177ee1f
1 changed files with 395 additions and 393 deletions

View File

@ -223,12 +223,13 @@ minetest.register_ore({
} }
}) })
-- if minetest.settings:get("mcl_generate_ores") == "true" then
-- Coal --
-- -- Coal
--
-- Common spawn -- Common spawn
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_coal", ore = "mcl_core:stone_with_coal",
wherein = stonelike, wherein = stonelike,
@ -237,8 +238,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,
y_max = mcl_worlds.layer_to_y(50), y_max = mcl_worlds.layer_to_y(50),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_coal", ore = "mcl_core:stone_with_coal",
wherein = stonelike, wherein = stonelike,
@ -247,8 +248,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,
y_max = mcl_worlds.layer_to_y(50), y_max = mcl_worlds.layer_to_y(50),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_coal", ore = "mcl_core:stone_with_coal",
wherein = stonelike, wherein = stonelike,
@ -257,10 +258,10 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,
y_max = mcl_worlds.layer_to_y(50), y_max = mcl_worlds.layer_to_y(50),
}) })
-- Medium-rare spawn -- Medium-rare spawn
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_coal", ore = "mcl_core:stone_with_coal",
wherein = stonelike, wherein = stonelike,
@ -269,8 +270,8 @@ minetest.register_ore({
clust_size = 2, clust_size = 2,
y_min = mcl_worlds.layer_to_y(51), y_min = mcl_worlds.layer_to_y(51),
y_max = mcl_worlds.layer_to_y(80), y_max = mcl_worlds.layer_to_y(80),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_coal", ore = "mcl_core:stone_with_coal",
wherein = stonelike, wherein = stonelike,
@ -279,8 +280,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_worlds.layer_to_y(51), y_min = mcl_worlds.layer_to_y(51),
y_max = mcl_worlds.layer_to_y(80), y_max = mcl_worlds.layer_to_y(80),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_coal", ore = "mcl_core:stone_with_coal",
wherein = stonelike, wherein = stonelike,
@ -289,10 +290,10 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_worlds.layer_to_y(51), y_min = mcl_worlds.layer_to_y(51),
y_max = mcl_worlds.layer_to_y(80), y_max = mcl_worlds.layer_to_y(80),
}) })
-- Rare spawn -- Rare spawn
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_coal", ore = "mcl_core:stone_with_coal",
wherein = stonelike, wherein = stonelike,
@ -301,8 +302,8 @@ minetest.register_ore({
clust_size = 2, clust_size = 2,
y_min = mcl_worlds.layer_to_y(81), y_min = mcl_worlds.layer_to_y(81),
y_max = mcl_worlds.layer_to_y(128), y_max = mcl_worlds.layer_to_y(128),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_coal", ore = "mcl_core:stone_with_coal",
wherein = stonelike, wherein = stonelike,
@ -311,8 +312,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_worlds.layer_to_y(81), y_min = mcl_worlds.layer_to_y(81),
y_max = mcl_worlds.layer_to_y(128), y_max = mcl_worlds.layer_to_y(128),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_coal", ore = "mcl_core:stone_with_coal",
wherein = stonelike, wherein = stonelike,
@ -321,12 +322,12 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_worlds.layer_to_y(81), y_min = mcl_worlds.layer_to_y(81),
y_max = mcl_worlds.layer_to_y(128), y_max = mcl_worlds.layer_to_y(128),
}) })
-- --
-- Iron -- Iron
-- --
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_iron", ore = "mcl_core:stone_with_iron",
wherein = stonelike, wherein = stonelike,
@ -335,8 +336,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,
y_max = mcl_worlds.layer_to_y(39), y_max = mcl_worlds.layer_to_y(39),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_iron", ore = "mcl_core:stone_with_iron",
wherein = stonelike, wherein = stonelike,
@ -345,14 +346,14 @@ minetest.register_ore({
clust_size = 2, clust_size = 2,
y_min = mcl_worlds.layer_to_y(40), y_min = mcl_worlds.layer_to_y(40),
y_max = mcl_worlds.layer_to_y(63), y_max = mcl_worlds.layer_to_y(63),
}) })
-- --
-- Gold -- Gold
-- --
-- Common spawn -- Common spawn
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_gold", ore = "mcl_core:stone_with_gold",
wherein = stonelike, wherein = stonelike,
@ -361,8 +362,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,
y_max = mcl_worlds.layer_to_y(30), y_max = mcl_worlds.layer_to_y(30),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_gold", ore = "mcl_core:stone_with_gold",
wherein = stonelike, wherein = stonelike,
@ -371,10 +372,10 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,
y_max = mcl_worlds.layer_to_y(30), y_max = mcl_worlds.layer_to_y(30),
}) })
-- Rare spawn -- Rare spawn
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_gold", ore = "mcl_core:stone_with_gold",
wherein = stonelike, wherein = stonelike,
@ -383,14 +384,14 @@ minetest.register_ore({
clust_size = 2, clust_size = 2,
y_min = mcl_worlds.layer_to_y(31), y_min = mcl_worlds.layer_to_y(31),
y_max = mcl_worlds.layer_to_y(33), y_max = mcl_worlds.layer_to_y(33),
}) })
-- --
-- Diamond -- Diamond
-- --
-- Common spawn -- Common spawn
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_diamond", ore = "mcl_core:stone_with_diamond",
wherein = stonelike, wherein = stonelike,
@ -399,8 +400,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,
y_max = mcl_worlds.layer_to_y(12), y_max = mcl_worlds.layer_to_y(12),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_diamond", ore = "mcl_core:stone_with_diamond",
wherein = stonelike, wherein = stonelike,
@ -409,8 +410,8 @@ minetest.register_ore({
clust_size = 2, clust_size = 2,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,
y_max = mcl_worlds.layer_to_y(12), y_max = mcl_worlds.layer_to_y(12),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_diamond", ore = "mcl_core:stone_with_diamond",
wherein = stonelike, wherein = stonelike,
@ -419,10 +420,10 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,
y_max = mcl_worlds.layer_to_y(12), y_max = mcl_worlds.layer_to_y(12),
}) })
-- Rare spawn -- Rare spawn
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_diamond", ore = "mcl_core:stone_with_diamond",
wherein = stonelike, wherein = stonelike,
@ -431,8 +432,8 @@ minetest.register_ore({
clust_size = 1, clust_size = 1,
y_min = mcl_worlds.layer_to_y(13), y_min = mcl_worlds.layer_to_y(13),
y_max = mcl_worlds.layer_to_y(15), y_max = mcl_worlds.layer_to_y(15),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_diamond", ore = "mcl_core:stone_with_diamond",
wherein = stonelike, wherein = stonelike,
@ -441,14 +442,14 @@ minetest.register_ore({
clust_size = 2, clust_size = 2,
y_min = mcl_worlds.layer_to_y(13), y_min = mcl_worlds.layer_to_y(13),
y_max = mcl_worlds.layer_to_y(15), y_max = mcl_worlds.layer_to_y(15),
}) })
-- --
-- Redstone -- Redstone
-- --
-- Common spawn -- Common spawn
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_redstone", ore = "mcl_core:stone_with_redstone",
wherein = stonelike, wherein = stonelike,
@ -457,8 +458,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,
y_max = mcl_worlds.layer_to_y(13), y_max = mcl_worlds.layer_to_y(13),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_redstone", ore = "mcl_core:stone_with_redstone",
wherein = stonelike, wherein = stonelike,
@ -467,10 +468,10 @@ minetest.register_ore({
clust_size = 4, clust_size = 4,
y_min = mcl_vars.mg_overworld_min, y_min = mcl_vars.mg_overworld_min,
y_max = mcl_worlds.layer_to_y(13), y_max = mcl_worlds.layer_to_y(13),
}) })
-- Rare spawn -- Rare spawn
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_redstone", ore = "mcl_core:stone_with_redstone",
wherein = stonelike, wherein = stonelike,
@ -479,8 +480,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_worlds.layer_to_y(13), y_min = mcl_worlds.layer_to_y(13),
y_max = mcl_worlds.layer_to_y(15), y_max = mcl_worlds.layer_to_y(15),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_redstone", ore = "mcl_core:stone_with_redstone",
wherein = stonelike, wherein = stonelike,
@ -489,13 +490,13 @@ minetest.register_ore({
clust_size = 4, clust_size = 4,
y_min = mcl_worlds.layer_to_y(13), y_min = mcl_worlds.layer_to_y(13),
y_max = mcl_worlds.layer_to_y(15), y_max = mcl_worlds.layer_to_y(15),
}) })
-- --
-- Emerald -- Emerald
-- --
if mg_name == "v6" then if mg_name == "v6" then
-- Generate everywhere in v6, but rarely. -- Generate everywhere in v6, but rarely.
-- Common spawn -- Common spawn
@ -520,14 +521,14 @@ if mg_name == "v6" then
y_min = mcl_worlds.layer_to_y(30), y_min = mcl_worlds.layer_to_y(30),
y_max = mcl_worlds.layer_to_y(32), y_max = mcl_worlds.layer_to_y(32),
}) })
end end
-- --
-- Lapis Lazuli -- Lapis Lazuli
-- --
-- Common spawn (in the center) -- Common spawn (in the center)
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_lapis", ore = "mcl_core:stone_with_lapis",
wherein = stonelike, wherein = stonelike,
@ -536,10 +537,10 @@ minetest.register_ore({
clust_size = 4, clust_size = 4,
y_min = mcl_worlds.layer_to_y(14), y_min = mcl_worlds.layer_to_y(14),
y_max = mcl_worlds.layer_to_y(16), y_max = mcl_worlds.layer_to_y(16),
}) })
-- Rare spawn (below center) -- Rare spawn (below center)
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_lapis", ore = "mcl_core:stone_with_lapis",
wherein = stonelike, wherein = stonelike,
@ -548,8 +549,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_worlds.layer_to_y(10), y_min = mcl_worlds.layer_to_y(10),
y_max = mcl_worlds.layer_to_y(13), y_max = mcl_worlds.layer_to_y(13),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_lapis", ore = "mcl_core:stone_with_lapis",
wherein = stonelike, wherein = stonelike,
@ -558,8 +559,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_worlds.layer_to_y(6), y_min = mcl_worlds.layer_to_y(6),
y_max = mcl_worlds.layer_to_y(9), y_max = mcl_worlds.layer_to_y(9),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_lapis", ore = "mcl_core:stone_with_lapis",
wherein = stonelike, wherein = stonelike,
@ -568,8 +569,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_worlds.layer_to_y(2), y_min = mcl_worlds.layer_to_y(2),
y_max = mcl_worlds.layer_to_y(5), y_max = mcl_worlds.layer_to_y(5),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_lapis", ore = "mcl_core:stone_with_lapis",
wherein = stonelike, wherein = stonelike,
@ -578,10 +579,10 @@ minetest.register_ore({
clust_size = 2, clust_size = 2,
y_min = mcl_worlds.layer_to_y(0), y_min = mcl_worlds.layer_to_y(0),
y_max = mcl_worlds.layer_to_y(2), y_max = mcl_worlds.layer_to_y(2),
}) })
-- Rare spawn (above center) -- Rare spawn (above center)
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_lapis", ore = "mcl_core:stone_with_lapis",
wherein = stonelike, wherein = stonelike,
@ -590,8 +591,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_worlds.layer_to_y(17), y_min = mcl_worlds.layer_to_y(17),
y_max = mcl_worlds.layer_to_y(20), y_max = mcl_worlds.layer_to_y(20),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_lapis", ore = "mcl_core:stone_with_lapis",
wherein = stonelike, wherein = stonelike,
@ -600,8 +601,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_worlds.layer_to_y(21), y_min = mcl_worlds.layer_to_y(21),
y_max = mcl_worlds.layer_to_y(24), y_max = mcl_worlds.layer_to_y(24),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_lapis", ore = "mcl_core:stone_with_lapis",
wherein = stonelike, wherein = stonelike,
@ -610,8 +611,8 @@ minetest.register_ore({
clust_size = 3, clust_size = 3,
y_min = mcl_worlds.layer_to_y(25), y_min = mcl_worlds.layer_to_y(25),
y_max = mcl_worlds.layer_to_y(28), y_max = mcl_worlds.layer_to_y(28),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_lapis", ore = "mcl_core:stone_with_lapis",
wherein = stonelike, wherein = stonelike,
@ -620,8 +621,8 @@ minetest.register_ore({
clust_size = 2, clust_size = 2,
y_min = mcl_worlds.layer_to_y(29), y_min = mcl_worlds.layer_to_y(29),
y_max = mcl_worlds.layer_to_y(32), y_max = mcl_worlds.layer_to_y(32),
}) })
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_core:stone_with_lapis", ore = "mcl_core:stone_with_lapis",
wherein = stonelike, wherein = stonelike,
@ -630,7 +631,8 @@ minetest.register_ore({
clust_size = 1, clust_size = 1,
y_min = mcl_worlds.layer_to_y(31), y_min = mcl_worlds.layer_to_y(31),
y_max = mcl_worlds.layer_to_y(32), y_max = mcl_worlds.layer_to_y(32),
}) })
end
if not superflat then if not superflat then
-- Water and lava springs (single blocks of lava/water source) -- Water and lava springs (single blocks of lava/water source)