Register dimension stuff independent of mapgen
This commit is contained in:
parent
39f4573294
commit
974db12867
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
--
|
--
|
||||||
-- Register biomes for mapgens other than v6
|
-- Register biomes
|
||||||
-- EXPERIMENTAL!
|
|
||||||
--
|
--
|
||||||
|
|
||||||
local function register_classic_superflat_biome()
|
local function register_classic_superflat_biome()
|
||||||
@ -549,13 +548,13 @@ local function register_biomes()
|
|||||||
heat_point = 50,
|
heat_point = 50,
|
||||||
humidity_point = 50,
|
humidity_point = 50,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Register biomes of non-Overworld biomes
|
||||||
|
local function register_dimension_biomes()
|
||||||
--[[ REALMS ]]
|
--[[ REALMS ]]
|
||||||
-- TODO: Make these work in v6, too.
|
|
||||||
|
|
||||||
--[[ THE NETHER ]]
|
--[[ THE NETHER ]]
|
||||||
|
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "nether",
|
name = "nether",
|
||||||
node_filler = "mcl_nether:netherrack",
|
node_filler = "mcl_nether:netherrack",
|
||||||
@ -569,20 +568,18 @@ local function register_biomes()
|
|||||||
})
|
})
|
||||||
|
|
||||||
--[[ THE END ]]
|
--[[ THE END ]]
|
||||||
|
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "end",
|
name = "end",
|
||||||
node_filler = "mcl_end:end_stone",
|
node_filler = "mcl_end:end_stone",
|
||||||
node_stone = "mcl_end:end_stone",
|
node_stone = "mcl_end:end_stone",
|
||||||
y_min = mcl_vars.mg_end_min,
|
-- FIXME: For some reason the End stops generating early if this constant is not added.
|
||||||
-- FIXME: For some reason the Nether stops generating early if this constant is not added.
|
|
||||||
-- Figure out why.
|
-- Figure out why.
|
||||||
|
y_min = mcl_vars.mg_end_min,
|
||||||
y_max = mcl_vars.mg_end_max + 80,
|
y_max = mcl_vars.mg_end_max + 80,
|
||||||
heat_point = 50,
|
heat_point = 50,
|
||||||
humidity_point = 50,
|
humidity_point = 50,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Register “fake” ores directly related to the biomes
|
-- Register “fake” ores directly related to the biomes
|
||||||
@ -826,7 +823,10 @@ local function register_biomelike_ores()
|
|||||||
noise_threshold = 0.0,
|
noise_threshold = 0.0,
|
||||||
noise_params = {offset=0, scale=1, spread= {x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
|
noise_params = {offset=0, scale=1, spread= {x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Non-Overworld ores
|
||||||
|
local function register_dimension_ores()
|
||||||
|
|
||||||
--[[ NETHER GENERATION ]]
|
--[[ NETHER GENERATION ]]
|
||||||
|
|
||||||
@ -1513,6 +1513,10 @@ local function register_decorations()
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Decorations in non-Overworld dimensions
|
||||||
|
local function register_dimension_decorations()
|
||||||
--[[ NETHER decorations ]]
|
--[[ NETHER decorations ]]
|
||||||
|
|
||||||
-- Red Mushroom
|
-- Red Mushroom
|
||||||
@ -1560,10 +1564,8 @@ local function register_decorations()
|
|||||||
y_max = mcl_vars.mg_nether_max,
|
y_max = mcl_vars.mg_nether_max,
|
||||||
decoration = "mcl_nether:nether_wart",
|
decoration = "mcl_nether:nether_wart",
|
||||||
})
|
})
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Detect mapgen to select functions
|
-- Detect mapgen to select functions
|
||||||
--
|
--
|
||||||
@ -1582,4 +1584,10 @@ elseif mg_name == "flat" then
|
|||||||
minetest.clear_registered_schematics()
|
minetest.clear_registered_schematics()
|
||||||
register_classic_superflat_biome()
|
register_classic_superflat_biome()
|
||||||
end
|
end
|
||||||
-- v6 decorations are handled in mcl_mapgen_core
|
|
||||||
|
-- Non-overworld stuff is registered independently
|
||||||
|
register_dimension_biomes()
|
||||||
|
register_dimension_ores()
|
||||||
|
register_dimension_decorations()
|
||||||
|
|
||||||
|
-- Overworld decorations for v6 are handled in mcl_mapgen_core
|
||||||
|
@ -1266,8 +1266,8 @@ minetest.register_on_generated(function(minp, maxp)
|
|||||||
else
|
else
|
||||||
-- Perfectly flat bedrock layer(s)
|
-- Perfectly flat bedrock layer(s)
|
||||||
if (y >= mcl_vars.mg_bedrock_overworld_min and y <= mcl_vars.mg_bedrock_overworld_max) or
|
if (y >= mcl_vars.mg_bedrock_overworld_min and y <= mcl_vars.mg_bedrock_overworld_max) or
|
||||||
(y >= mcl_vars.mg_bedrock_nether_bottom_min or y <= mcl_vars.mg_bedrock_bottom_max) or
|
(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 or y <= mcl_vars.mg_bedrock_top_max) then
|
(y >= mcl_vars.mg_bedrock_nether_top_min and y <= mcl_vars.mg_bedrock_nether_top_max) then
|
||||||
setdata = c_bedrock
|
setdata = c_bedrock
|
||||||
elseif mcl_util.is_in_void({x=x,y=y,z=z}) then
|
elseif mcl_util.is_in_void({x=x,y=y,z=z}) then
|
||||||
setdata = c_void
|
setdata = c_void
|
||||||
|
Loading…
Reference in New Issue
Block a user