- --do normal weather
- if player_pos.y > -10033 then
- if snow == true then
- weather_effects(minetest.localplayer, "snow")
- elseif rain == true then
- weather_effects(minetest.localplayer, "rain")
- end
- --rain blood upwards in the nether
- else
- if snow == true or rain == true then
- weather_effects(minetest.localplayer, "ichor")
- end
-
- --stop the rain sound effect
- if rain_sound_handle then
- minetest.sound_fade(rain_sound_handle, -0.5, 0)
- rain_sound_handle = nil
+ current_node = minetest.get_node_or_nil(minetest.camera:get_pos())
+ if current_node and not liquids[current_node.name] then
+ --do normal weather
+ if player_pos.y > -10033 then
+ if snow == true then
+ weather_effects(minetest.localplayer, "snow")
+ elseif rain == true then
+ weather_effects(minetest.localplayer, "rain")
+ end
+ --rain blood upwards in the nether
+ else
+ if snow == true or rain == true then
+ weather_effects(minetest.localplayer, "ichor")
+ end
+
+ --stop the rain sound effect
+ if rain_sound_handle then
+ minetest.sound_fade(rain_sound_handle, -0.5, 0)
+ rain_sound_handle = nil
+ end