Merge pull request 'Overworld Biome Sky And Fog Colours' (#3158) from biome_skycolor_overworld into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3158
Reviewed-by: kabou <kabou@noreply.git.minetest.land>
FossFanatic 2022-12-24 15:01:43 +00:00
commit fb8f59e918
2 changed files with 229 additions and 10 deletions

@ -3,26 +3,35 @@ local NIGHT_VISION_RATIO = 0.45
local water_color = "#0b4880" local water_color = "#0b4880"
function mcl_weather.set_sky_box_clear(player) local mg_name = minetest.get_mapgen_setting("mg_name")
function mcl_weather.set_sky_box_clear(player, sky, fog)
local pos = player:get_pos() local pos = player:get_pos()
if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then return end if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then return end
player:set_sky({ local sc = {
type = "regular", day_sky = "#0000FF", -- Pure blue to make debugging this stuff easier. Not visible during normal gameplay.
sky_color = { day_horizon = "#FF0000", -- Pure red to make debugging this stuff easier. Not visible during normal gameplay.
day_sky = "#92B9FF",
day_horizon = "#B4D0FF",
dawn_sky = "#B4BAFA", dawn_sky = "#B4BAFA",
dawn_horizon = "#BAC1F0", dawn_horizon = "#BAC1F0",
night_sky = "#000000", night_sky = "#000000",
night_horizon = "#4A6790", night_horizon = "#4A6790",
}, }
if sky then
sc.day_sky = sky
end
if fog then
sc.day_horizon = fog
end
player:set_sky({
type = "regular",
sky_color = sc,
clouds = true, clouds = true,
}) })
end end
function mcl_weather.set_sky_color(player, def) function mcl_weather.set_sky_color(player, def)
local pos = player:get_pos() local pos = player:get_pos()
if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then return end if minetest.get_item_group(minetest.get_node(vector.offset(pos, 0, 1.5, 0)).name, "water") ~= 0 then return end
player:set_sky({ player:set_sky({
type = def.type, type = def.type,
sky_color = def.sky_color, sky_color = def.sky_color,
@ -124,9 +133,16 @@ mcl_weather.skycolor = {
}) })
end end
if dim == "overworld" then if dim == "overworld" then
local biomesky
local biomefog
if mg_name ~= "v6" and mg_name ~= "singlenode" then
local biome = minetest.get_biome_name(minetest.get_biome_data(player:get_pos()).biome)
biomesky = minetest.registered_biomes[biome]._mcl_skycolor
biomefog = minetest.registered_biomes[biome]._mcl_fogcolor
end
if (mcl_weather.state == "none") then if (mcl_weather.state == "none") then
-- Clear weather -- Clear weather
mcl_weather.set_sky_box_clear(player) mcl_weather.set_sky_box_clear(player,biomesky,biomefog)
player:set_sun({visible = true, sunrise_visible = true}) player:set_sun({visible = true, sunrise_visible = true})
player:set_moon({visible = true}) player:set_moon({visible = true})
player:set_stars({visible = true}) player:set_stars({visible = true})

@ -42,6 +42,8 @@ local function register_classic_superflat_biome()
heat_point = 50, heat_point = 50,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 0, _mcl_palette_index = 0,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
}) })
end end
@ -128,6 +130,15 @@ local function register_biomes()
"MangroveSwamp", "MangroveSwamp",
} }
local beach_skycolor = "#78A7FF" -- This is the case for all beach biomes except for the snowy ones! Those beaches will have their own colour instead of this one.
local ocean_skycolor = "#7BA4FF" -- This is the case for all ocean biomes except for non-deep frozen oceans! Those oceans will have their own colour instead of this one.
local overworld_fogcolor = "#C0D8FF"
local nether_skycolor = "#6EB1FF"
local end_fogcolor = "#A080A0"
local end_skycolor = "#000000"
-- Ice Plains Spikes (rare) -- Ice Plains Spikes (rare)
minetest.register_biome({ minetest.register_biome({
name = "IcePlainsSpikes", name = "IcePlainsSpikes",
@ -146,6 +157,8 @@ local function register_biomes()
heat_point = -5, heat_point = -5,
_mcl_biome_type = "snowy", _mcl_biome_type = "snowy",
_mcl_palette_index = 2, _mcl_palette_index = 2,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "IcePlainsSpikes_ocean", name = "IcePlainsSpikes_ocean",
@ -162,6 +175,8 @@ local function register_biomes()
heat_point = -5, heat_point = -5,
_mcl_biome_type = "snowy", _mcl_biome_type = "snowy",
_mcl_palette_index = 2, _mcl_palette_index = 2,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
-- Cold Taiga -- Cold Taiga
@ -180,6 +195,8 @@ local function register_biomes()
heat_point = 8, heat_point = 8,
_mcl_biome_type = "snowy", _mcl_biome_type = "snowy",
_mcl_palette_index = 3, _mcl_palette_index = 3,
_mcl_skycolor = "#839EFF",
_mcl_fogcolor = overworld_fogcolor
}) })
-- A cold beach-like biome, implemented as low part of Cold Taiga -- A cold beach-like biome, implemented as low part of Cold Taiga
@ -200,6 +217,8 @@ local function register_biomes()
heat_point = 8, heat_point = 8,
_mcl_biome_type = "snowy", _mcl_biome_type = "snowy",
_mcl_palette_index = 3, _mcl_palette_index = 3,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
-- Water part of the beach. Added to prevent snow being on the ice. -- Water part of the beach. Added to prevent snow being on the ice.
minetest.register_biome({ minetest.register_biome({
@ -218,6 +237,8 @@ local function register_biomes()
heat_point = 8, heat_point = 8,
_mcl_biome_type = "snowy", _mcl_biome_type = "snowy",
_mcl_palette_index = 3, _mcl_palette_index = 3,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "ColdTaiga_ocean", name = "ColdTaiga_ocean",
@ -234,9 +255,11 @@ local function register_biomes()
vertical_blend = 1, vertical_blend = 1,
_mcl_biome_type = "snowy", _mcl_biome_type = "snowy",
_mcl_palette_index = 3, _mcl_palette_index = 3,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
-- Mega Taiga -- Mega Pine Taiga
minetest.register_biome({ minetest.register_biome({
name = "MegaTaiga", name = "MegaTaiga",
node_top = "mcl_core:podzol", node_top = "mcl_core:podzol",
@ -251,6 +274,8 @@ local function register_biomes()
heat_point = 10, heat_point = 10,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 4, _mcl_palette_index = 4,
_mcl_skycolor = "#7CA3FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "MegaTaiga_ocean", name = "MegaTaiga_ocean",
@ -266,6 +291,8 @@ local function register_biomes()
heat_point = 10, heat_point = 10,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 4, _mcl_palette_index = 4,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Mega Spruce Taiga -- Mega Spruce Taiga
@ -283,6 +310,8 @@ local function register_biomes()
heat_point = 8, heat_point = 8,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 5, _mcl_palette_index = 5,
_mcl_skycolor = "#7DA3FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "MegaSpruceTaiga_ocean", name = "MegaSpruceTaiga_ocean",
@ -298,6 +327,8 @@ local function register_biomes()
heat_point = 8, heat_point = 8,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 5, _mcl_palette_index = 5,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Extreme Hills -- Extreme Hills
@ -316,6 +347,8 @@ local function register_biomes()
heat_point = 45, heat_point = 45,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 6, _mcl_palette_index = 6,
_mcl_skycolor = "#7DA2FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "ExtremeHills_beach", name = "ExtremeHills_beach",
@ -332,6 +365,8 @@ local function register_biomes()
heat_point = 45, heat_point = 45,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 6, _mcl_palette_index = 6,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "ExtremeHills_ocean", name = "ExtremeHills_ocean",
@ -348,6 +383,8 @@ local function register_biomes()
heat_point = 45, heat_point = 45,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 6, _mcl_palette_index = 6,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Extreme Hills M -- Extreme Hills M
@ -366,6 +403,8 @@ local function register_biomes()
heat_point = 25, heat_point = 25,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 7, _mcl_palette_index = 7,
_mcl_skycolor = "#7DA2FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "ExtremeHillsM_ocean", name = "ExtremeHillsM_ocean",
@ -381,6 +420,8 @@ local function register_biomes()
heat_point = 25, heat_point = 25,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 7, _mcl_palette_index = 7,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Extreme Hills+ -- Extreme Hills+
@ -401,6 +442,8 @@ local function register_biomes()
vertical_blend = 6, vertical_blend = 6,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 8, _mcl_palette_index = 8,
_mcl_skycolor = "#7DA2FF",
_mcl_fogcolor = overworld_fogcolor
}) })
---- Sub-biome for Extreme Hills+ for those snow forests ---- Sub-biome for Extreme Hills+ for those snow forests
minetest.register_biome({ minetest.register_biome({
@ -419,6 +462,8 @@ local function register_biomes()
heat_point = 25, heat_point = 25,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 8, _mcl_palette_index = 8,
_mcl_skycolor = "#7DA2FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "ExtremeHills+_ocean", name = "ExtremeHills+_ocean",
@ -434,6 +479,8 @@ local function register_biomes()
heat_point = 25, heat_point = 25,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 8, _mcl_palette_index = 8,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Stone beach -- Stone beach
@ -449,6 +496,8 @@ local function register_biomes()
heat_point = 8, heat_point = 8,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 9, _mcl_palette_index = 9,
_mcl_skycolor = "#7DA2FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
@ -464,6 +513,8 @@ local function register_biomes()
heat_point = 8, heat_point = 8,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 9, _mcl_palette_index = 9,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Ice Plains -- Ice Plains
@ -485,6 +536,8 @@ local function register_biomes()
heat_point = 8, heat_point = 8,
_mcl_biome_type = "snowy", _mcl_biome_type = "snowy",
_mcl_palette_index = 10, _mcl_palette_index = 10,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "IcePlains_ocean", name = "IcePlains_ocean",
@ -500,6 +553,8 @@ local function register_biomes()
heat_point = 8, heat_point = 8,
_mcl_biome_type = "snowy", _mcl_biome_type = "snowy",
_mcl_palette_index = 10, _mcl_palette_index = 10,
_mcl_skycolor = "#7FA1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
-- Plains -- Plains
@ -517,6 +572,8 @@ local function register_biomes()
heat_point = 58, heat_point = 58,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 0, _mcl_palette_index = 0,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Plains_beach", name = "Plains_beach",
@ -532,6 +589,8 @@ local function register_biomes()
heat_point = 58, heat_point = 58,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 0, _mcl_palette_index = 0,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Plains_ocean", name = "Plains_ocean",
@ -547,6 +606,8 @@ local function register_biomes()
heat_point = 58, heat_point = 58,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 0, _mcl_palette_index = 0,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Sunflower Plains -- Sunflower Plains
@ -564,6 +625,8 @@ local function register_biomes()
heat_point = 45, heat_point = 45,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 11, _mcl_palette_index = 11,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "SunflowerPlains_ocean", name = "SunflowerPlains_ocean",
@ -579,6 +642,8 @@ local function register_biomes()
heat_point = 45, heat_point = 45,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 11, _mcl_palette_index = 11,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Taiga -- Taiga
@ -596,6 +661,8 @@ local function register_biomes()
heat_point = 22, heat_point = 22,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 12, _mcl_palette_index = 12,
_mcl_skycolor = "#7DA3FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Taiga_beach", name = "Taiga_beach",
@ -611,6 +678,8 @@ local function register_biomes()
heat_point = 22, heat_point = 22,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 12, _mcl_palette_index = 12,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Taiga_ocean", name = "Taiga_ocean",
@ -626,6 +695,8 @@ local function register_biomes()
heat_point = 22, heat_point = 22,
_mcl_biome_type = "cold", _mcl_biome_type = "cold",
_mcl_palette_index = 12, _mcl_palette_index = 12,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Forest -- Forest
@ -643,6 +714,8 @@ local function register_biomes()
heat_point = 45, heat_point = 45,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 13, _mcl_palette_index = 13,
_mcl_skycolor = "#79A6FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Forest_beach", name = "Forest_beach",
@ -658,6 +731,8 @@ local function register_biomes()
heat_point = 45, heat_point = 45,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 13, _mcl_palette_index = 13,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Forest_ocean", name = "Forest_ocean",
@ -673,6 +748,8 @@ local function register_biomes()
heat_point = 45, heat_point = 45,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 13, _mcl_palette_index = 13,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Flower Forest -- Flower Forest
@ -690,6 +767,8 @@ local function register_biomes()
heat_point = 32, heat_point = 32,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 14, _mcl_palette_index = 14,
_mcl_skycolor = "#79A6FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "FlowerForest_beach", name = "FlowerForest_beach",
@ -705,6 +784,8 @@ local function register_biomes()
heat_point = 32, heat_point = 32,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 14, _mcl_palette_index = 14,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "FlowerForest_ocean", name = "FlowerForest_ocean",
@ -720,6 +801,8 @@ local function register_biomes()
heat_point = 32, heat_point = 32,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 14, _mcl_palette_index = 14,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Birch Forest -- Birch Forest
@ -737,6 +820,8 @@ local function register_biomes()
heat_point = 31, heat_point = 31,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 15, _mcl_palette_index = 15,
_mcl_skycolor = "#7AA5FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "BirchForest_ocean", name = "BirchForest_ocean",
@ -752,6 +837,8 @@ local function register_biomes()
heat_point = 31, heat_point = 31,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 15, _mcl_palette_index = 15,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Birch Forest M -- Birch Forest M
@ -769,6 +856,8 @@ local function register_biomes()
heat_point = 27, heat_point = 27,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 16, _mcl_palette_index = 16,
_mcl_skycolor = "#7AA5FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "BirchForestM_ocean", name = "BirchForestM_ocean",
@ -784,6 +873,8 @@ local function register_biomes()
heat_point = 27, heat_point = 27,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 16, _mcl_palette_index = 16,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Desert -- Desert
@ -802,6 +893,8 @@ local function register_biomes()
heat_point = 94, heat_point = 94,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 17, _mcl_palette_index = 17,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Desert_ocean", name = "Desert_ocean",
@ -817,6 +910,8 @@ local function register_biomes()
heat_point = 94, heat_point = 94,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 17, _mcl_palette_index = 17,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Roofed Forest -- Roofed Forest
@ -834,6 +929,8 @@ local function register_biomes()
heat_point = 27, heat_point = 27,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 18, _mcl_palette_index = 18,
_mcl_skycolor = "#79A6FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "RoofedForest_ocean", name = "RoofedForest_ocean",
@ -849,6 +946,8 @@ local function register_biomes()
heat_point = 27, heat_point = 27,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 18, _mcl_palette_index = 18,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Mesa: Starts with a couple of sand-covered layers (the "sandlevel"), -- Mesa: Starts with a couple of sand-covered layers (the "sandlevel"),
@ -867,6 +966,8 @@ local function register_biomes()
heat_point = 100, heat_point = 100,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 19, _mcl_palette_index = 19,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
-- Helper biome for the red sand at the bottom of Mesas. -- Helper biome for the red sand at the bottom of Mesas.
minetest.register_biome({ minetest.register_biome({
@ -884,6 +985,8 @@ local function register_biomes()
heat_point = 100, heat_point = 100,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 19, _mcl_palette_index = 19,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Mesa_ocean", name = "Mesa_ocean",
@ -900,6 +1003,8 @@ local function register_biomes()
heat_point = 100, heat_point = 100,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 19, _mcl_palette_index = 19,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Mesa Bryce: Variant of Mesa, but with perfect strata and a much smaller red sand desert -- Mesa Bryce: Variant of Mesa, but with perfect strata and a much smaller red sand desert
@ -917,6 +1022,8 @@ local function register_biomes()
heat_point = 100, heat_point = 100,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 20, _mcl_palette_index = 20,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "MesaBryce_sandlevel", name = "MesaBryce_sandlevel",
@ -933,6 +1040,8 @@ local function register_biomes()
heat_point = 100, heat_point = 100,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 20, _mcl_palette_index = 20,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "MesaBryce_ocean", name = "MesaBryce_ocean",
@ -949,6 +1058,8 @@ local function register_biomes()
heat_point = 100, heat_point = 100,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 20, _mcl_palette_index = 20,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
@ -970,6 +1081,8 @@ local function register_biomes()
vertical_blend = 0, -- we want a sharp transition vertical_blend = 0, -- we want a sharp transition
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 21, _mcl_palette_index = 21,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
-- The oak forest plateau of this biome. -- The oak forest plateau of this biome.
-- This is a plateau for grass blocks, dry shrubs, tall grass, coarse dirt and oaks. -- This is a plateau for grass blocks, dry shrubs, tall grass, coarse dirt and oaks.
@ -989,6 +1102,8 @@ local function register_biomes()
heat_point = 60, heat_point = 60,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 21, _mcl_palette_index = 21,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "MesaPlateauF_sandlevel", name = "MesaPlateauF_sandlevel",
@ -1005,6 +1120,8 @@ local function register_biomes()
heat_point = 60, heat_point = 60,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 21, _mcl_palette_index = 21,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "MesaPlateauF_ocean", name = "MesaPlateauF_ocean",
@ -1021,6 +1138,8 @@ local function register_biomes()
heat_point = 60, heat_point = 60,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 21, _mcl_palette_index = 21,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Mesa Plateau FM -- Mesa Plateau FM
@ -1042,6 +1161,8 @@ local function register_biomes()
vertical_blend = 5, vertical_blend = 5,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 22, _mcl_palette_index = 22,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
-- Grass plateau -- Grass plateau
minetest.register_biome({ minetest.register_biome({
@ -1059,6 +1180,8 @@ local function register_biomes()
heat_point = 60, heat_point = 60,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 22, _mcl_palette_index = 22,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "MesaPlateauFM_sandlevel", name = "MesaPlateauFM_sandlevel",
@ -1077,6 +1200,8 @@ local function register_biomes()
vertical_blend = 4, vertical_blend = 4,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 22, _mcl_palette_index = 22,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "MesaPlateauFM_ocean", name = "MesaPlateauFM_ocean",
@ -1093,6 +1218,8 @@ local function register_biomes()
heat_point = 60, heat_point = 60,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 22, _mcl_palette_index = 22,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
@ -1111,6 +1238,8 @@ local function register_biomes()
heat_point = 79, heat_point = 79,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 1, _mcl_palette_index = 1,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Savanna_beach", name = "Savanna_beach",
@ -1126,6 +1255,8 @@ local function register_biomes()
heat_point = 79, heat_point = 79,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 1, _mcl_palette_index = 1,
_mcl_skycolor = beach_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Savanna_ocean", name = "Savanna_ocean",
@ -1141,6 +1272,8 @@ local function register_biomes()
heat_point = 79, heat_point = 79,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 1, _mcl_palette_index = 1,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Savanna M -- Savanna M
@ -1160,6 +1293,8 @@ local function register_biomes()
heat_point = 100, heat_point = 100,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 23, _mcl_palette_index = 23,
_mcl_skycolor = "#6EB1FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "SavannaM_ocean", name = "SavannaM_ocean",
@ -1175,6 +1310,8 @@ local function register_biomes()
heat_point = 100, heat_point = 100,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 23, _mcl_palette_index = 23,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Jungle -- Jungle
@ -1192,6 +1329,8 @@ local function register_biomes()
heat_point = 81, heat_point = 81,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 24, _mcl_palette_index = 24,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Jungle_shore", name = "Jungle_shore",
@ -1207,6 +1346,8 @@ local function register_biomes()
heat_point = 81, heat_point = 81,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 24, _mcl_palette_index = 24,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Jungle_ocean", name = "Jungle_ocean",
@ -1223,6 +1364,8 @@ local function register_biomes()
heat_point = 81, heat_point = 81,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 24, _mcl_palette_index = 24,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Jungle M -- Jungle M
@ -1241,6 +1384,8 @@ local function register_biomes()
heat_point = 81, heat_point = 81,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 25, _mcl_palette_index = 25,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "JungleM_shore", name = "JungleM_shore",
@ -1256,6 +1401,8 @@ local function register_biomes()
heat_point = 81, heat_point = 81,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 25, _mcl_palette_index = 25,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "JungleM_ocean", name = "JungleM_ocean",
@ -1272,6 +1419,8 @@ local function register_biomes()
heat_point = 81, heat_point = 81,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 25, _mcl_palette_index = 25,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Jungle Edge -- Jungle Edge
@ -1289,6 +1438,8 @@ local function register_biomes()
heat_point = 76, heat_point = 76,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 26, _mcl_palette_index = 26,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "JungleEdge_ocean", name = "JungleEdge_ocean",
@ -1304,6 +1455,8 @@ local function register_biomes()
heat_point = 76, heat_point = 76,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 26, _mcl_palette_index = 26,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Jungle Edge M (very rare). -- Jungle Edge M (very rare).
@ -1324,6 +1477,8 @@ local function register_biomes()
heat_point = 79, heat_point = 79,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 27, _mcl_palette_index = 27,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "JungleEdgeM_ocean", name = "JungleEdgeM_ocean",
@ -1339,6 +1494,8 @@ local function register_biomes()
heat_point = 79, heat_point = 79,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 27, _mcl_palette_index = 27,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Mangrove swamp -- Mangrove swamp
@ -1357,6 +1514,8 @@ local function register_biomes()
heat_point = 94, heat_point = 94,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 27, _mcl_palette_index = 27,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "MangroveSwamp_shore", name = "MangroveSwamp_shore",
@ -1372,6 +1531,8 @@ local function register_biomes()
heat_point = 94, heat_point = 94,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 27, _mcl_palette_index = 27,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "MangroveSwamp_ocean", name = "MangroveSwamp_ocean",
@ -1388,6 +1549,8 @@ local function register_biomes()
heat_point = 94, heat_point = 94,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 27, _mcl_palette_index = 27,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Swampland -- Swampland
minetest.register_biome({ minetest.register_biome({
@ -1405,6 +1568,8 @@ local function register_biomes()
heat_point = 50, heat_point = 50,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 28, _mcl_palette_index = 28,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Swampland_shore", name = "Swampland_shore",
@ -1420,6 +1585,8 @@ local function register_biomes()
heat_point = 50, heat_point = 50,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 28, _mcl_palette_index = 28,
_mcl_skycolor = "#78A7FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "Swampland_ocean", name = "Swampland_ocean",
@ -1436,6 +1603,8 @@ local function register_biomes()
heat_point = 50, heat_point = 50,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 28, _mcl_palette_index = 28,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Mushroom Island / Mushroom Island Shore (rare) -- Mushroom Island / Mushroom Island Shore (rare)
@ -1456,6 +1625,8 @@ local function register_biomes()
heat_point = 50, heat_point = 50,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 29, _mcl_palette_index = 29,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
@ -1472,6 +1643,8 @@ local function register_biomes()
heat_point = 50, heat_point = 50,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 29, _mcl_palette_index = 29,
_mcl_skycolor = "#77A8FF",
_mcl_fogcolor = overworld_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "MushroomIsland_ocean", name = "MushroomIsland_ocean",
@ -1487,6 +1660,8 @@ local function register_biomes()
heat_point = 50, heat_point = 50,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 29, _mcl_palette_index = 29,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Add deep ocean and underground biomes automatically. -- Add deep ocean and underground biomes automatically.
@ -1509,6 +1684,8 @@ local function register_biomes()
vertical_blend = 5, vertical_blend = 5,
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type, _mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
_mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index, _mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index,
_mcl_skycolor = ocean_skycolor,
_mcl_fogcolor = overworld_fogcolor
}) })
-- Underground biomes are used to identify the underground and to prevent nodes from the surface -- Underground biomes are used to identify the underground and to prevent nodes from the surface
@ -1521,6 +1698,8 @@ local function register_biomes()
y_max = DEEP_OCEAN_MIN - 1, y_max = DEEP_OCEAN_MIN - 1,
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type, _mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
_mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index, _mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index,
_mcl_skycolor = minetest.registered_biomes[biome]._mcl_skycolor,
_mcl_fogcolor = minetest.registered_biomes[biome]._mcl_fogcolor,
}) })
end end
@ -1575,6 +1754,8 @@ local function register_dimension_biomes()
humidity_point = 0, humidity_point = 0,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 17, _mcl_palette_index = 17,
-- _mcl_skycolor = nether_skycolor,
-- _mcl_fogcolor = "#330808"
}) })
minetest.register_decoration({ minetest.register_decoration({
@ -1604,6 +1785,8 @@ local function register_dimension_biomes()
humidity_point = 33, humidity_point = 33,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 17, _mcl_palette_index = 17,
-- _mcl_skycolor = nether_skycolor,
-- _mcl_fogcolor = "#1B4745"
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
@ -1653,6 +1836,8 @@ local function register_dimension_biomes()
humidity_point = 47, humidity_point = 47,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 17, _mcl_palette_index = 17,
-- _mcl_skycolor = nether_skycolor,
-- _mcl_fogcolor = "#330303"
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
@ -1680,6 +1865,8 @@ local function register_dimension_biomes()
humidity_point = 70, humidity_point = 70,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 17, _mcl_palette_index = 17,
-- _mcl_skycolor = nether_skycolor,
-- _mcl_fogcolor = "#1A051A"
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
@ -1707,6 +1894,8 @@ local function register_dimension_biomes()
humidity_point = 80, humidity_point = 80,
_mcl_biome_type = "hot", _mcl_biome_type = "hot",
_mcl_palette_index = 17, _mcl_palette_index = 17,
-- _mcl_skycolor = nether_skycolor,
-- _mcl_fogcolor = "#685F70"
}) })
minetest.register_decoration({ minetest.register_decoration({
@ -1759,6 +1948,8 @@ local function register_dimension_biomes()
vertical_blend = 16, vertical_blend = 16,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 0, _mcl_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "EndBarrens", name = "EndBarrens",
@ -1774,6 +1965,8 @@ local function register_dimension_biomes()
vertical_blend = 16, vertical_blend = 16,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 0, _mcl_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "EndMidlands", name = "EndMidlands",
@ -1789,6 +1982,8 @@ local function register_dimension_biomes()
vertical_blend = 16, vertical_blend = 16,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 0, _mcl_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "EndHighlands", name = "EndHighlands",
@ -1804,6 +1999,8 @@ local function register_dimension_biomes()
vertical_blend = 16, vertical_blend = 16,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 0, _mcl_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
name = "EndSmallIslands", name = "EndSmallIslands",
@ -1819,6 +2016,8 @@ local function register_dimension_biomes()
vertical_blend = 16, vertical_blend = 16,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 0, _mcl_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
@ -1837,6 +2036,8 @@ local function register_dimension_biomes()
min_pos = {x = -1250, y = mcl_vars.mg_end_min, z = -1250}, min_pos = {x = -1250, y = mcl_vars.mg_end_min, z = -1250},
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 0, _mcl_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
}) })
minetest.register_biome({ minetest.register_biome({
@ -1853,6 +2054,8 @@ local function register_dimension_biomes()
vertical_blend = 16, vertical_blend = 16,
_mcl_biome_type = "medium", _mcl_biome_type = "medium",
_mcl_palette_index = 0, _mcl_palette_index = 0,
-- _mcl_skycolor = end_skycolor,
-- _mcl_fogcolor = end_fogcolor
}) })
end end