From 7be8ab2c1c8e5659c03a60d9f6c94793b2abd10d Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 12 Aug 2022 15:11:49 +0200 Subject: [PATCH] Send shadows to client if server supports it --- mods/ENVIRONMENT/mcl_weather/skycolor.lua | 5 +++++ settingtypes.txt | 3 +++ 2 files changed, 8 insertions(+) diff --git a/mods/ENVIRONMENT/mcl_weather/skycolor.lua b/mods/ENVIRONMENT/mcl_weather/skycolor.lua index f98ee18c0c..a4108598fd 100644 --- a/mods/ENVIRONMENT/mcl_weather/skycolor.lua +++ b/mods/ENVIRONMENT/mcl_weather/skycolor.lua @@ -276,6 +276,11 @@ minetest.register_globalstep(function(dtime) end) local function initsky(player) + + if player.set_lighting then + player:set_lighting({ shadows = { intensity = tonumber(minetest.settings:get("mcl_default_shadow_intensity") or 0.33) } }) + end + if (mcl_weather.skycolor.active) then mcl_weather.skycolor.force_update = true end diff --git a/settingtypes.txt b/settingtypes.txt index 7c8bc651ed..a883905c69 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -115,6 +115,9 @@ animated_chests (Animated chests) bool true # The maximum number of boss bars to simultaniously display on the screen max_bossbars (Maximum Boss bars) int 5 +# Default intensity of shadows (default: 0.33) +mcl_default_shadow_intensity (Default shadow intensity) float 0.33 0.0 1.0 + [Experimental] # Whether ice is translucent. If disabled, ice is fully opaque. #