Merge pull request 'ENVIRONMENT/mcl_weather: remove unnecessary on_dimensionchange' (#152) from weather-dimchange-fix into master

Reviewed-on: MineClone5/MineClone5#152
This commit is contained in:
kay27 2022-01-31 21:25:17 +00:00
commit 31f60346cb
1 changed files with 0 additions and 13 deletions

View File

@ -119,19 +119,6 @@ function mcl_weather.rain.remove_player(player)
end
end
mcl_worlds.register_on_dimension_change(function(player, dimension)
if dimension ~= "overworld" and dimension ~= "void" then
mcl_weather.rain.remove_sound(player)
mcl_weather.rain.remove_player(player)
elseif dimension == "overworld" then
mcl_weather.rain.update_sound(player)
if mcl_weather.rain.raining then
mcl_weather.rain.add_rain_particles(player)
mcl_weather.rain.add_player(player)
end
end
end)
-- adds and removes rain sound depending how much rain particles around player currently exist.
-- have few seconds delay before each check to avoid on/off sound too often
-- when player stay on 'edge' where sound should play and stop depending from random raindrop appearance.