1
0
Fork 0

Merge pull request 'Add setting to disable ores generation' (#1174) from AFCMS/MineClone2:master into master

Reviewed-on: MineClone2/MineClone2#1174
This commit is contained in:
kay27 2021-02-25 10:04:13 +00:00
commit e23ad6cabf
3 changed files with 420 additions and 413 deletions

View File

@ -2043,6 +2043,7 @@ local function register_dimension_ores()
}) })
-- Nether quartz -- Nether quartz
if minetest.settings:get("mcl_generate_ores") == "true" then
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_nether:quartz_ore", ore = "mcl_nether:quartz_ore",
@ -2063,6 +2064,7 @@ local function register_dimension_ores()
y_min = mcl_vars.mg_nether_min, y_min = mcl_vars.mg_nether_min,
y_max = mcl_vars.mg_nether_max, y_max = mcl_vars.mg_nether_max,
}) })
end
-- Lava springs in the Nether -- Lava springs in the Nether
minetest.register_ore({ minetest.register_ore({

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)

View File

@ -126,6 +126,9 @@ mcl_generate_fallen_logs (Generate fallen logs) bool false
# But creating new flat worlds after changing this setting should be safe. # But creating new flat worlds after changing this setting should be safe.
mcl_superflat_classic (Classic superflat map generation) bool false mcl_superflat_classic (Classic superflat map generation) bool false
# If disabled, no ores will be generated.
mcl_generate_ores (Generate Ores) bool true
# Make some blocks emit decorative particles like flames. This setting # Make some blocks emit decorative particles like flames. This setting
# specifies the detail level of particles, with higher levels being # specifies the detail level of particles, with higher levels being
# more CPU demanding. # more CPU demanding.