1
0
Fork 0

Fix underground and deep ocean biomes for once

objects
Wuzzy 2017-09-13 05:41:43 +02:00
parent 006f27750e
commit 8ebbfd9ab4
2 changed files with 83 additions and 15 deletions

View File

@ -48,10 +48,19 @@ local function register_biomes()
In MT, any biome can occour in any terrain, so these variants are implied and are therefore
not explicitly implmented in MCL2. M variants are only included if they have another unique feature,
such as a different land cover.
In MCL2, the MC Overworld biomes are usually split in two or more parts (stacked by height), at least
a land part and an ocean part. Sometimes there's a beach/shore part as well.
In MCL2, the MC Overworld biomes are split in multiple more parts (stacked by height):
* The main part, this represents the land. It begins at around sea level and usually goes all the way up
* _ocean: For the area covered by ocean water. The y_max may vary for various beach effects.
Has sand or dirt as floor.
* _deep_ocean: Like _ocean, but deeper and has gravel as floor
* _underground:
* Other modifiers: Some complex biomes require more layers to improve the landscape.
The ocean biomes correspond to the MC Ocean biome.
The following naming conventions apply:
* The land biome name is equal to the MC biome name (in camel case)
* Height modifiers and sub-biomes are appended with underscores and in lowercase. Example: _ocean
* Non-MC biomes are written in lowercase
* MC dimension biomes are named after their MC dimension
Intentionally missing biomes:
* River (generated by valleys and v7)
@ -67,14 +76,8 @@ local function register_biomes()
* Mesa Plateau F M
* Extreme Hills Edge
The following naming conventions apply:
* The land biome name is equal to the MC biome name (in camel case)
* Height modifiers and sub-biomes are appended with underscores and in lowercase. Example: _ocean
* Non-MC biomes are written in lowercase
* MC dimension biomes are named after their MC dimension
TODO:
* Better beaches (varying height, beach and cold beach as biomes)
* Better beaches
* Extreme Hills+ M
* Desert M
@ -85,7 +88,42 @@ local function register_biomes()
]]
local OCEAN_MIN = mcl_vars.mg_overworld_min
-- List of Overworld biomes without modifiers.
-- IMPORTANT: Don't forget to add new Overworld biomes to this list!
local overworld_biomes = {
"IcePlains",
"IcePlainsSpikes",
"ColdTaiga",
"ExtremeHills",
"ExtremeHillsM",
"ExtremeHills+",
"Taiga",
"MegaTaiga",
"MegaSpruceTaiga",
"StoneBeach",
"Plains",
"SunflowerPlains",
"Forest",
"FlowerForest",
"BirchForest",
"BirchForestM",
"RoofedForest",
"Swampland",
"Jungle",
"JungleM",
"JungleEdge",
"JungleEdgeM",
"MushroomIsland",
"Desert",
"Savanna",
"SavannaM",
"Mesa",
"MesaPlateauF",
}
local OCEAN_MIN = -15
local DEEP_OCEAN_MAX = OCEAN_MIN - 1
local DEEP_OCEAN_MIN = -31
-- Ice Plains Spikes (rare)
minetest.register_biome({
@ -1112,6 +1150,36 @@ local function register_biomes()
heat_point = 50,
})
-- Add deep ocean and underground biomes automatically.
for i=1, #overworld_biomes do
local biome = overworld_biomes[i]
-- Deep Ocean: Has gravel floor
minetest.register_biome({
name = biome .. "_deep_ocean",
heat_point = minetest.registered_biomes[biome].heat_point,
humidity_point = minetest.registered_biomes[biome].humidity_point,
y_min = DEEP_OCEAN_MIN,
y_max = DEEP_OCEAN_MAX,
node_top = "mcl_core:gravel",
depth_top = 1,
node_filler = "mcl_core:gravel",
depth_filler = 2,
node_riverbed = "mcl_core:gravel",
depth_riverbed = 2,
})
-- Underground biomes are used to identify the underground and to prevent nodes from the surface
-- (sand, dirt) from leaking into the underground.
minetest.register_biome({
name = biome .. "_underground",
heat_point = minetest.registered_biomes[biome].heat_point,
humidity_point = minetest.registered_biomes[biome].humidity_point,
y_min = mcl_vars.mg_overworld_min,
y_max = DEEP_OCEAN_MIN - 1,
})
end
end
-- Register biomes of non-Overworld biomes

View File

@ -439,7 +439,7 @@ else
clust_size = 1,
y_min = mcl_util.layer_to_y(4),
y_max = mcl_util.layer_to_y(32),
biomes = { "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", },
biomes = { "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground" },
})
end
@ -645,7 +645,7 @@ minetest.register_ore({
clust_size = 2,
y_min = mcl_vars.mg_overworld_min,
y_max = mcl_util.layer_to_y(61),
biomes = { "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", },
biomes = { "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground" },
})
@ -1173,8 +1173,8 @@ local function generate_structures(minp, maxp, seed, biomemap)
if ground_y <= 0 and nn == "mcl_core:dirt" then
local prob = minecraft_chunk_probability(48, minp, maxp)
local swampland = minetest.get_biome_id("JungleEdge")
local swampland_shore = minetest.get_biome_id("JungleEdge_ocean")
local swampland = minetest.get_biome_id("Swampland")
local swampland_shore = minetest.get_biome_id("Swampland_shore")
-- Where do witches live?