mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Merge pull request 'Nether & End Biome Sky/Fog Colours' (#3342) from biome_skycolor_otherworlds into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3342 Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
This commit is contained in:
commit
63360bcab2
2 changed files with 68 additions and 49 deletions
|
@ -210,9 +210,23 @@ mcl_weather.skycolor = {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif dim == "end" then
|
elseif dim == "end" then
|
||||||
|
local biomesky = "#000000"
|
||||||
|
local biomefog = "#A080A0"
|
||||||
|
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
||||||
|
local biome_index = minetest.get_biome_data(player:get_pos()).biome
|
||||||
|
local biome_name = minetest.get_biome_name(biome_index)
|
||||||
|
local biome = minetest.registered_biomes[biome_name]
|
||||||
|
if biome then
|
||||||
|
--minetest.log("action", string.format("Biome found for number: %s in biome: %s", tostring(biome_index), biome_name))
|
||||||
|
biomesky = biome._mcl_skycolor
|
||||||
|
biomefog = biome._mcl_fogcolor -- The End biomes seemingly don't use the fog colour, despite having this value according to the wiki. The sky colour is seemingly used for both sky and fog?
|
||||||
|
else
|
||||||
|
--minetest.log("action", string.format("No biome for number: %s in biome: %s", tostring(biome_index), biome_name))
|
||||||
|
end
|
||||||
|
end
|
||||||
local t = "mcl_playerplus_end_sky.png"
|
local t = "mcl_playerplus_end_sky.png"
|
||||||
player:set_sky({ type = "skybox",
|
player:set_sky({ type = "skybox",
|
||||||
base_color = "#000000",
|
base_color = biomesky,
|
||||||
textures = {t,t,t,t,t,t},
|
textures = {t,t,t,t,t,t},
|
||||||
clouds = false,
|
clouds = false,
|
||||||
})
|
})
|
||||||
|
@ -221,24 +235,29 @@ mcl_weather.skycolor = {
|
||||||
player:set_stars({visible = false})
|
player:set_stars({visible = false})
|
||||||
mcl_weather.skycolor.override_day_night_ratio(player, 0.5)
|
mcl_weather.skycolor.override_day_night_ratio(player, 0.5)
|
||||||
elseif dim == "nether" then
|
elseif dim == "nether" then
|
||||||
local nether_sky = {
|
local biomesky = "#6EB1FF"
|
||||||
Nether = "#300808",
|
local biomefog = "#330808"
|
||||||
BasaltDelta = "#685F70",
|
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
||||||
SoulsandValley = "#1B4745",
|
local biome_index = minetest.get_biome_data(player:get_pos()).biome
|
||||||
CrimsonForest = "#330303",
|
local biome_name = minetest.get_biome_name(biome_index)
|
||||||
WarpedForest = "#1A051A"
|
local biome = minetest.registered_biomes[biome_name]
|
||||||
}
|
if biome then
|
||||||
local biometint = nether_sky[minetest.get_biome_name(minetest.get_biome_data(player:get_pos()).biome)]
|
--minetest.log("action", string.format("Biome found for number: %s in biome: %s", tostring(biome_index), biome_name))
|
||||||
|
biomesky = biome._mcl_skycolor -- The Nether biomes seemingly don't use the sky colour, despite having this value according to the wiki. The fog colour is used for both sky and fog.
|
||||||
|
biomefog = biome._mcl_fogcolor
|
||||||
|
else
|
||||||
|
--minetest.log("action", string.format("No biome for number: %s in biome: %s", tostring(biome_index), biome_name))
|
||||||
|
end
|
||||||
|
end
|
||||||
mcl_weather.set_sky_color(player, {
|
mcl_weather.set_sky_color(player, {
|
||||||
type = "regular",
|
type = "regular",
|
||||||
sky_color = {
|
sky_color = {
|
||||||
day_sky = "#300808",
|
day_sky = biomefog,
|
||||||
day_horizon = biometint,
|
day_horizon = biomefog,
|
||||||
dawn_sky = "#300808",
|
dawn_sky = biomefog,
|
||||||
dawn_horizon = biometint,
|
dawn_horizon = biomefog,
|
||||||
night_sky = "#300808",
|
night_sky = biomefog,
|
||||||
night_horizon = biometint,
|
night_horizon = biomefog,
|
||||||
},
|
},
|
||||||
clouds = false,
|
clouds = false,
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
local overworld_fogcolor = "#C0D8FF"
|
||||||
|
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 nether_skycolor = "#6EB1FF" -- The Nether biomes seemingly don't use the sky colour, despite having this value according to the wiki. The fog colour is used for both sky and fog.
|
||||||
|
|
||||||
|
local end_skycolor = "#000000"
|
||||||
|
local end_fogcolor = "#A080A0" -- The End biomes seemingly don't use the fog colour, despite having this value according to the wiki. The sky colour is used for both sky and fog.
|
||||||
|
|
||||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||||
local mg_seed = minetest.get_mapgen_setting("seed")
|
local mg_seed = minetest.get_mapgen_setting("seed")
|
||||||
|
|
||||||
|
@ -134,15 +143,6 @@ local function register_biomes()
|
||||||
"BambooJungleEdgeM",
|
"BambooJungleEdgeM",
|
||||||
}
|
}
|
||||||
|
|
||||||
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",
|
||||||
|
@ -1940,8 +1940,8 @@ local function register_dimension_biomes()
|
||||||
humidity_point = 0,
|
humidity_point = 0,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
-- _mcl_skycolor = nether_skycolor,
|
_mcl_skycolor = nether_skycolor,
|
||||||
-- _mcl_fogcolor = "#330808"
|
_mcl_fogcolor = "#330808"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
|
@ -1971,8 +1971,8 @@ local function register_dimension_biomes()
|
||||||
humidity_point = 33,
|
humidity_point = 33,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
-- _mcl_skycolor = nether_skycolor,
|
_mcl_skycolor = nether_skycolor,
|
||||||
-- _mcl_fogcolor = "#1B4745"
|
_mcl_fogcolor = "#1B4745"
|
||||||
})
|
})
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
|
@ -2022,8 +2022,8 @@ local function register_dimension_biomes()
|
||||||
humidity_point = 47,
|
humidity_point = 47,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
-- _mcl_skycolor = nether_skycolor,
|
_mcl_skycolor = nether_skycolor,
|
||||||
-- _mcl_fogcolor = "#330303"
|
_mcl_fogcolor = "#330303"
|
||||||
})
|
})
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
|
@ -2051,8 +2051,8 @@ local function register_dimension_biomes()
|
||||||
humidity_point = 70,
|
humidity_point = 70,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
-- _mcl_skycolor = nether_skycolor,
|
_mcl_skycolor = nether_skycolor,
|
||||||
-- _mcl_fogcolor = "#1A051A"
|
_mcl_fogcolor = "#1A051A"
|
||||||
})
|
})
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
|
@ -2080,8 +2080,8 @@ local function register_dimension_biomes()
|
||||||
humidity_point = 80,
|
humidity_point = 80,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
-- _mcl_skycolor = nether_skycolor,
|
_mcl_skycolor = nether_skycolor,
|
||||||
-- _mcl_fogcolor = "#685F70"
|
_mcl_fogcolor = "#685F70"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
|
@ -2134,8 +2134,8 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
-- _mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
-- _mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "EndBarrens",
|
name = "EndBarrens",
|
||||||
|
@ -2151,8 +2151,8 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
-- _mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
-- _mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "EndMidlands",
|
name = "EndMidlands",
|
||||||
|
@ -2168,8 +2168,8 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
-- _mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
-- _mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "EndHighlands",
|
name = "EndHighlands",
|
||||||
|
@ -2185,8 +2185,8 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
-- _mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
-- _mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "EndSmallIslands",
|
name = "EndSmallIslands",
|
||||||
|
@ -2202,8 +2202,8 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
-- _mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
-- _mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
|
@ -2222,8 +2222,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_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
-- _mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
-- _mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
|
@ -2240,8 +2240,8 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
-- _mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
-- _mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue