The Nether is now supported in v6, too

This commit is contained in:
Wuzzy 2017-08-17 23:58:35 +02:00
parent 974db12867
commit dc1cb9b659
2 changed files with 38 additions and 20 deletions

View file

@ -834,7 +834,9 @@ local function register_dimension_ores()
minetest.register_ore({
ore_type = "sheet",
ore = "mcl_nether:soul_sand",
wherein = {"mcl_nether:netherrack"},
-- Note: Stone is included only for v6 mapgen support. Netherrack is not generated naturally
-- in v6, but instead set with the on_generated function in mcl_mapgen_core.
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 13 * 13 * 13,
clust_size = 5,
y_min = mcl_vars.mg_nether_min,
@ -854,7 +856,7 @@ local function register_dimension_ores()
minetest.register_ore({
ore_type = "blob",
ore = "mcl_nether:magma",
wherein = {"mcl_nether:netherrack"},
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 14*14*14,
clust_num_ores = 35,
clust_size = 4,
@ -876,7 +878,7 @@ local function register_dimension_ores()
minetest.register_ore({
ore_type = "blob",
ore = "mcl_nether:glowstone",
wherein = {"mcl_nether:netherrack"},
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 26 * 26 * 26,
clust_size = 5,
y_min = mcl_vars.mg_lava_nether_max + 10,
@ -896,7 +898,7 @@ local function register_dimension_ores()
minetest.register_ore({
ore_type = "sheet",
ore = "mcl_core:gravel",
wherein = {"mcl_nether:netherrack"},
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
column_height_min = 1,
column_height_max = 1,
y_min = mcl_util.layer_to_y(63, "nether"),
@ -916,7 +918,7 @@ local function register_dimension_ores()
minetest.register_ore({
ore_type = "scatter",
ore = "mcl_nether:quartz_ore",
wherein = {"mcl_nether:netherrack"},
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 850,
clust_num_ores = 4, -- MC cluster amount: 4-10
clust_size = 3,
@ -926,7 +928,7 @@ local function register_dimension_ores()
minetest.register_ore({
ore_type = "scatter",
ore = "mcl_nether:quartz_ore",
wherein = {"mcl_nether:netherrack"},
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 1650,
clust_num_ores = 8, -- MC cluster amount: 4-10
clust_size = 4,
@ -938,7 +940,7 @@ local function register_dimension_ores()
minetest.register_ore({
ore_type = "scatter",
ore = "mcl_nether:nether_lava_source",
wherein = {"mcl_nether:netherrack"},
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 500,
clust_num_ores = 1,
clust_size = 1,
@ -949,7 +951,7 @@ local function register_dimension_ores()
minetest.register_ore({
ore_type = "scatter",
ore = "mcl_nether:nether_lava_source",
wherein = {"mcl_nether:netherrack"},
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 1000,
clust_num_ores = 1,
clust_size = 1,
@ -960,7 +962,7 @@ local function register_dimension_ores()
minetest.register_ore({
ore_type = "scatter",
ore = "mcl_nether:nether_lava_source",
wherein = {"mcl_nether:netherrack"},
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 2000,
clust_num_ores = 1,
clust_size = 1,
@ -970,7 +972,7 @@ local function register_dimension_ores()
minetest.register_ore({
ore_type = "scatter",
ore = "mcl_nether:nether_lava_source",
wherein = {"mcl_nether:netherrack"},
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity = 3500,
clust_num_ores = 1,
clust_size = 1,
@ -978,11 +980,12 @@ local function register_dimension_ores()
y_max = mcl_vars.mg_nether_max,
})
-- Fire in the Nether
-- Fire in the Nether (hacky)
-- FIXME: Remove this when fire as decoration is available
minetest.register_ore({
ore_type = "scatter",
ore = "mcl_fire:eternal_fire",
wherein = "mcl_nether:netherrack",
wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
clust_scarcity =12 *22 * 12,
clust_num_ores = 5,
clust_size = 5,

View file

@ -594,8 +594,8 @@ minetest.register_ore({
clust_scarcity = monster_egg_scarcity,
clust_num_ores = 3,
clust_size = 2,
y_min = -31000,
y_max = 31000,
y_min = mcl_vars.mg_overworld_min,
y_max = mcl_vars.mg_overworld_max,
-- TODO: Limit by biome
})
@ -1058,7 +1058,7 @@ local lvm_buffer = {}
-- Generate cocoas and vines at jungle trees within the bounding box
local function generate_jungle_tree_decorations(minp, maxp)
if minetest.get_mapgen_setting("mg_name") == "v6" then
if mg_name == "v6" then
if maxp.y < 0 then
return
@ -1213,10 +1213,16 @@ minetest.register_on_generated(function(minp, maxp)
-- Generate bedrock and lava layers
if minp.y <= GEN_MAX then
local c_bedrock = minetest.get_content_id("mcl_core:bedrock")
local c_stone = minetest.get_content_id("mcl_core:stone")
local c_dirt = minetest.get_content_id("mcl_core:dirt")
local c_sand = minetest.get_content_id("mcl_core:sand")
local c_void = minetest.get_content_id("mcl_core:void")
local c_lava = minetest.get_content_id("mcl_core:lava_source")
local c_realm_barrier = minetest.get_content_id("mcl_core:realm_barrier")
local c_soul_sand = minetest.get_content_id("mcl_nether:soul_sand")
local c_netherrack = minetest.get_content_id("mcl_nether:netherrack")
local c_nether_lava = minetest.get_content_id("mcl_nether:nether_lava_source")
local c_end_stone = minetest.get_content_id("mcl_end:end_stone")
local c_realm_barrier = minetest.get_content_id("mcl_core:realm_barrier")
local c_air = minetest.get_content_id("air")
local max_y = math.min(maxp.y, GEN_MAX)
@ -1260,8 +1266,6 @@ minetest.register_on_generated(function(minp, maxp)
end
if is_bedrock(y) then
setdata = c_bedrock
elseif mcl_util.is_in_void({x=x,y=y,z=z}) then
setdata = c_void
end
else
-- Perfectly flat bedrock layer(s)
@ -1269,14 +1273,14 @@ minetest.register_on_generated(function(minp, maxp)
(y >= mcl_vars.mg_bedrock_nether_bottom_min and y <= mcl_vars.mg_bedrock_nether_bottom_max) or
(y >= mcl_vars.mg_bedrock_nether_top_min and y <= mcl_vars.mg_bedrock_nether_top_max) then
setdata = c_bedrock
elseif mcl_util.is_in_void({x=x,y=y,z=z}) then
setdata = c_void
end
end
if setdata then
data[p_pos] = setdata
lvm_used = true
elseif mcl_util.is_in_void({x=x,y=y,z=z}) then
setdata = c_void
-- Big lava seas by replacing air below a certain height
elseif mcl_vars.mg_lava and data[p_pos] == c_air then
if y <= mcl_vars.mg_lava_overworld_max and y >= mcl_vars.mg_overworld_min then
@ -1290,6 +1294,17 @@ minetest.register_on_generated(function(minp, maxp)
elseif y >= mcl_vars.mg_realm_barrier_overworld_end_min and y <= mcl_vars.mg_realm_barrier_overworld_end_max then
data[p_pos] = c_realm_barrier
lvm_used = true
-- Nether and End support for v6 because v6 does not support the biomes API
elseif mg_name == "v6" then
if y <= mcl_vars.mg_nether_max and y >= mcl_vars.mg_nether_min then
if data[p_pos] == c_stone then
data[p_pos] = c_netherrack
elseif data[p_pos] == c_sand or data[p_pos] == c_dirt then
data[p_pos] = c_soul_sand
end
elseif y <= mcl_vars.mg_end_max and y >= mcl_vars.mg_end_min and (data[p_pos] == c_stone or data[p_pos] == c_dirt or data[p_pos] == c_sand) then
data[p_pos] = c_end_stone
end
end
end
end