mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 11:53:46 +01:00
Enable deepslate and copper generation
This commit is contained in:
parent
b377f67214
commit
00c8c53a57
@ -1,21 +1,15 @@
|
||||
local modname = minetest.get_current_modname()
|
||||
local S = minetest.get_translator(modname)
|
||||
|
||||
--local layer_max = mcl_worlds.layer_to_y(16)
|
||||
--local layer_min = mcl_vars.mg_overworld_min
|
||||
|
||||
local copper_mod = minetest.get_modpath("mcl_copper")
|
||||
|
||||
local cobble = "mcl_deepslate:deepslate_cobbled"
|
||||
local stick = "mcl_core:stick"
|
||||
|
||||
--[[
|
||||
local mountains = {
|
||||
"ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground",
|
||||
"ExtremeHills+", "ExtremeHills+_ocean", "ExtremeHills+_deep_ocean", "ExtremeHills+_underground",
|
||||
"ExtremeHillsM", "ExtremeHillsM_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHillsM_underground",
|
||||
}
|
||||
]]
|
||||
local function spawn_silverfish(pos, oldnode, oldmetadata, digger)
|
||||
if not minetest.is_creative_enabled("") then
|
||||
minetest.add_entity(pos, "mobs_mc:silverfish")
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_node("mcl_deepslate:deepslate", {
|
||||
description = S("Deepslate"),
|
||||
@ -34,12 +28,6 @@ minetest.register_node("mcl_deepslate:deepslate", {
|
||||
_mcl_silk_touch_drop = true,
|
||||
})
|
||||
|
||||
local function spawn_silverfish(pos, oldnode, oldmetadata, digger)
|
||||
if not minetest.is_creative_enabled("") then
|
||||
minetest.add_entity(pos, "mobs_mc:silverfish")
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_node("mcl_deepslate:infested_deepslate", {
|
||||
description = S("Infested Deepslate"),
|
||||
_doc_items_longdesc = S("An infested block is a block from which a silverfish will pop out when it is broken. It looks identical to its normal counterpart."),
|
||||
@ -198,173 +186,6 @@ minetest.register_node("mcl_deepslate:deepslate_with_redstone_lit", {
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "mesecons:redstone",
|
||||
recipe = "mcl_deepslate:deepslate_with_redstone",
|
||||
cooktime = 10,
|
||||
})
|
||||
|
||||
--[[ Commented out for now because there the discussion how to handle this is ongoing
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "mcl_deepslate:deepslate",
|
||||
wherein = { "mcl_core:stone" },
|
||||
clust_scarcity = 200,
|
||||
clust_num_ores = 100,
|
||||
clust_size = 10,
|
||||
y_min = layer_min,
|
||||
y_max = layer_max,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = { x = 250, y = 250, z = 250 },
|
||||
seed = 12345,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
lacunarity = 2,
|
||||
flags = "defaults",
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "mcl_deepslate:tuff",
|
||||
wherein = { "mcl_core:stone", "mcl_core:diorite", "mcl_core:andesite", "mcl_core:granite", "mcl_deepslate:deepslate" },
|
||||
clust_scarcity = 10*10*10,
|
||||
clust_num_ores = 58,
|
||||
clust_size = 7,
|
||||
y_min = layer_min,
|
||||
y_max = layer_max,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = {x=250, y=250, z=250},
|
||||
seed = 12345,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
lacunarity = 2,
|
||||
flags = "defaults",
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_deepslate:infested_deepslate",
|
||||
wherein = "mcl_deepslate:deepslate",
|
||||
clust_scarcity = 26 * 26 * 26,
|
||||
clust_num_ores = 3,
|
||||
clust_size = 2,
|
||||
y_min = layer_min,
|
||||
y_max = layer_max,
|
||||
biomes = mountains,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_core:water_source",
|
||||
wherein = "mcl_deepslate:deepslate",
|
||||
clust_scarcity = 9000,
|
||||
clust_num_ores = 1,
|
||||
clust_size = 1,
|
||||
y_min = mcl_worlds.layer_to_y(5),
|
||||
y_max = layer_max,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_core:lava_source",
|
||||
wherein = "mcl_deepslate:deepslate",
|
||||
clust_scarcity = 2000,
|
||||
clust_num_ores = 1,
|
||||
clust_size = 1,
|
||||
y_min = mcl_worlds.layer_to_y(1),
|
||||
y_max = mcl_worlds.layer_to_y(10),
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_core:lava_source",
|
||||
wherein = "mcl_deepslate:deepslate",
|
||||
clust_scarcity = 9000,
|
||||
clust_num_ores = 1,
|
||||
clust_size = 1,
|
||||
y_min = mcl_worlds.layer_to_y(11),
|
||||
y_max = layer_max,
|
||||
})
|
||||
|
||||
|
||||
if minetest.settings:get_bool("mcl_generate_ores", true) then
|
||||
local stonelike = { "mcl_core:stone", "mcl_core:diorite", "mcl_core:andesite", "mcl_core:granite" }
|
||||
local function register_ore_mg(ore, scarcity, num, size, y_min, y_max, biomes)
|
||||
biomes = biomes or ""
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = ore,
|
||||
wherein = { "mcl_deepslate:deepslate", "mcl_deepslate:tuff" },
|
||||
clust_scarcity = scarcity,
|
||||
clust_num_ores = num,
|
||||
clust_size = size,
|
||||
y_min = y_min,
|
||||
y_max = y_max,
|
||||
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) },
|
||||
}
|
||||
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])
|
||||
end
|
||||
if minetest.get_mapgen_setting("mg_name") == "v6" then
|
||||
register_ore_mg("mcl_deepslate:deepslate_with_emerald", 14340, 1, 1, layer_min, layer_max)
|
||||
else
|
||||
register_ore_mg("mcl_deepslate:deepslate_with_emerald", 16384, 1, 1, mcl_worlds.layer_to_y(4), layer_max, mountains)
|
||||
end
|
||||
if copper_mod then
|
||||
register_ore_mg("mcl_deepslate:deepslate_with_copper", 830, 5, 3, layer_min, layer_max)
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_copper:stone_with_copper",
|
||||
wherein = stonelike,
|
||||
clust_scarcity = 830,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
y_min = mcl_vars.mg_overworld_min,
|
||||
y_max = mcl_worlds.layer_to_y(39),
|
||||
})
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_copper:stone_with_copper",
|
||||
wherein = stonelike,
|
||||
clust_scarcity = 1660,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 2,
|
||||
y_min = mcl_worlds.layer_to_y(40),
|
||||
y_max = mcl_worlds.layer_to_y(63),
|
||||
})
|
||||
end
|
||||
end
|
||||
--]]
|
||||
local function register_deepslate_variant(item, desc, longdesc)
|
||||
local texture = desc:lower():gsub("% ", "_")
|
||||
local def = {
|
||||
@ -424,6 +245,13 @@ for _, p in pairs({ "bricks", "tiles" }) do
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "mesecons:redstone",
|
||||
recipe = "mcl_deepslate:deepslate_with_redstone",
|
||||
cooktime = 10,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "mcl_deepslate:deepslate",
|
||||
|
@ -1,5 +1,5 @@
|
||||
name = mcl_mapgen_core
|
||||
author = Wuzzy
|
||||
description = The core of the MCL2 mapgen
|
||||
depends = mcl_init, mcl_core, biomeinfo, mcl_worlds, mcl_cocoas, mcl_sponges, mcl_ocean, mcl_stairs, mcl_monster_eggs, mcl_structures
|
||||
optional_depends = mclx_core
|
||||
depends = mcl_init, mcl_core, mcl_deepslate, biomeinfo, mcl_worlds, mcl_cocoas, mcl_sponges, mcl_ocean, mcl_stairs, mcl_monster_eggs, mcl_structures
|
||||
optional_depends = mclx_core, mcl_copper
|
||||
|
@ -1,3 +1,15 @@
|
||||
|
||||
local deepslate_max = mcl_worlds.layer_to_y(16)
|
||||
local deepslate_min = mcl_vars.mg_overworld_min
|
||||
|
||||
local copper_mod = minetest.get_modpath("mcl_copper")
|
||||
|
||||
local mountains = {
|
||||
"ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground",
|
||||
"ExtremeHills+", "ExtremeHills+_ocean", "ExtremeHills+_deep_ocean", "ExtremeHills+_underground",
|
||||
"ExtremeHillsM", "ExtremeHillsM_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHillsM_underground",
|
||||
}
|
||||
|
||||
-- Diorite, andesite and granite
|
||||
local specialstones = { "mcl_core:diorite", "mcl_core:andesite", "mcl_core:granite" }
|
||||
for s=1, #specialstones do
|
||||
@ -91,6 +103,98 @@ minetest.register_ore({
|
||||
})
|
||||
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "mcl_deepslate:deepslate",
|
||||
wherein = { "mcl_core:stone" },
|
||||
clust_scarcity = 200,
|
||||
clust_num_ores = 100,
|
||||
clust_size = 10,
|
||||
y_min = deepslate_min,
|
||||
y_max = deepslate_max,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = { x = 250, y = 250, z = 250 },
|
||||
seed = 12345,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
lacunarity = 2,
|
||||
flags = "defaults",
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "mcl_deepslate:tuff",
|
||||
wherein = { "mcl_core:stone", "mcl_core:diorite", "mcl_core:andesite", "mcl_core:granite", "mcl_deepslate:deepslate" },
|
||||
clust_scarcity = 10*10*10,
|
||||
clust_num_ores = 58,
|
||||
clust_size = 7,
|
||||
y_min = deepslate_min,
|
||||
y_max = deepslate_max,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = {x=250, y=250, z=250},
|
||||
seed = 12345,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
lacunarity = 2,
|
||||
flags = "defaults",
|
||||
}
|
||||
})
|
||||
|
||||
-- DEEPSLATE
|
||||
if minetest.settings:get_bool("mcl_generate_deepslate", true) then
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_deepslate:infested_deepslate",
|
||||
wherein = "mcl_deepslate:deepslate",
|
||||
clust_scarcity = 26 * 26 * 26,
|
||||
clust_num_ores = 3,
|
||||
clust_size = 2,
|
||||
y_min = deepslate_min,
|
||||
y_max = deepslate_max,
|
||||
biomes = mountains,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_core:water_source",
|
||||
wherein = "mcl_deepslate:deepslate",
|
||||
clust_scarcity = 9000,
|
||||
clust_num_ores = 1,
|
||||
clust_size = 1,
|
||||
y_min = mcl_worlds.layer_to_y(5),
|
||||
y_max = deepslate_max,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_core:lava_source",
|
||||
wherein = "mcl_deepslate:deepslate",
|
||||
clust_scarcity = 2000,
|
||||
clust_num_ores = 1,
|
||||
clust_size = 1,
|
||||
y_min = mcl_worlds.layer_to_y(1),
|
||||
y_max = mcl_worlds.layer_to_y(10),
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_core:lava_source",
|
||||
wherein = "mcl_deepslate:deepslate",
|
||||
clust_scarcity = 9000,
|
||||
clust_num_ores = 1,
|
||||
clust_size = 1,
|
||||
y_min = mcl_worlds.layer_to_y(11),
|
||||
y_max = deepslate_max,
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
if minetest.settings:get_bool("mcl_generate_ores", true) then
|
||||
--
|
||||
-- Coal
|
||||
@ -540,6 +644,77 @@ if minetest.settings:get_bool("mcl_generate_ores", true) then
|
||||
y_min = mcl_worlds.layer_to_y(31),
|
||||
y_max = mcl_worlds.layer_to_y(32),
|
||||
})
|
||||
|
||||
if minetest.settings:get_bool("mcl_generate_deepslate", true) then
|
||||
local stonelike = { "mcl_core:stone", "mcl_core:diorite", "mcl_core:andesite", "mcl_core:granite" }
|
||||
local function register_ore_mg(ore, scarcity, num, size, y_min, y_max, biomes)
|
||||
biomes = biomes or ""
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = ore,
|
||||
wherein = { "mcl_deepslate:deepslate", "mcl_deepslate:tuff" },
|
||||
clust_scarcity = scarcity,
|
||||
clust_num_ores = num,
|
||||
clust_size = size,
|
||||
y_min = y_min,
|
||||
y_max = y_max,
|
||||
biomes = biomes,
|
||||
})
|
||||
end
|
||||
local ore_mapgen = {
|
||||
{ "coal", 1575, 5, 3, deepslate_min, deepslate_max },
|
||||
{ "coal", 1530, 8, 3, deepslate_min, deepslate_max },
|
||||
{ "coal", 1500, 12, 3, deepslate_min, deepslate_max },
|
||||
{ "iron", 830, 5, 3, deepslate_min, deepslate_max },
|
||||
{ "gold", 4775, 5, 3, deepslate_min, deepslate_max },
|
||||
{ "gold", 6560, 7, 3, deepslate_min, deepslate_max },
|
||||
{ "diamond", 10000, 4, 3, deepslate_min, mcl_worlds.layer_to_y(12) },
|
||||
{ "diamond", 5000, 2, 3, deepslate_min, mcl_worlds.layer_to_y(12) },
|
||||
{ "diamond", 10000, 8, 3, deepslate_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, deepslate_min, mcl_worlds.layer_to_y(13) },
|
||||
{ "redstone", 800, 7, 4, deepslate_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), deepslate_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])
|
||||
end
|
||||
if minetest.get_mapgen_setting("mg_name") == "v6" then
|
||||
register_ore_mg("mcl_deepslate:deepslate_with_emerald", 14340, 1, 1, deepslate_min, deepslate_max)
|
||||
else
|
||||
register_ore_mg("mcl_deepslate:deepslate_with_emerald", 16384, 1, 1, mcl_worlds.layer_to_y(4), deepslate_max, mountains)
|
||||
end
|
||||
if copper_mod then
|
||||
register_ore_mg("mcl_deepslate:deepslate_with_copper", 830, 5, 3, deepslate_min, deepslate_max)
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_copper:stone_with_copper",
|
||||
wherein = stonelike,
|
||||
clust_scarcity = 830,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
y_min = mcl_vars.mg_overworld_min,
|
||||
y_max = mcl_worlds.layer_to_y(39),
|
||||
})
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "mcl_copper:stone_with_copper",
|
||||
wherein = stonelike,
|
||||
clust_scarcity = 1660,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 2,
|
||||
y_min = mcl_worlds.layer_to_y(40),
|
||||
y_max = mcl_worlds.layer_to_y(63),
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if not superflat then
|
||||
|
@ -156,6 +156,9 @@ mcl_generate_fallen_logs (Generate fallen logs) bool false
|
||||
# But creating new flat worlds after changing this setting should be safe.
|
||||
mcl_superflat_classic (Classic superflat map generation) bool false
|
||||
|
||||
# If disabled, no deepslate will be generated.
|
||||
mcl_generate_deepslate (Generate Deepslate) bool true
|
||||
|
||||
# If disabled, no ores will be generated.
|
||||
mcl_generate_ores (Generate Ores) bool true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user