forked from VoxeLibre/VoxeLibre
No nether rain lol
This commit is contained in:
parent
05a6f09f05
commit
50840f6bdc
|
@ -42,6 +42,7 @@ local psdef= {
|
||||||
local textures = {"weather_pack_rain_raindrop_1.png", "weather_pack_rain_raindrop_2.png"}
|
local textures = {"weather_pack_rain_raindrop_1.png", "weather_pack_rain_raindrop_2.png"}
|
||||||
|
|
||||||
function mcl_weather.has_rain(pos)
|
function mcl_weather.has_rain(pos)
|
||||||
|
if not mcl_worlds.has_weather(pos) then return false end
|
||||||
if mgname == "singlenode" or mgname == "v6" then return true end
|
if mgname == "singlenode" or mgname == "v6" then return true end
|
||||||
local bd = minetest.get_biome_data(pos)
|
local bd = minetest.get_biome_data(pos)
|
||||||
local bn = minetest.get_biome_name(bd.biome)
|
local bn = minetest.get_biome_name(bd.biome)
|
||||||
|
|
|
@ -62,6 +62,7 @@ local psdef= {
|
||||||
}
|
}
|
||||||
|
|
||||||
function mcl_weather.has_snow(pos)
|
function mcl_weather.has_snow(pos)
|
||||||
|
if not mcl_worlds.has_weather(pos) then return false end
|
||||||
if mgname == "singlenode" or mgname == "v6" then return true end
|
if mgname == "singlenode" or mgname == "v6" then return true end
|
||||||
local bd = minetest.get_biome_data(pos)
|
local bd = minetest.get_biome_data(pos)
|
||||||
local bn = minetest.get_biome_name(bd.biome)
|
local bn = minetest.get_biome_name(bd.biome)
|
||||||
|
@ -121,7 +122,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, player in pairs(get_connected_players()) do
|
for _, player in pairs(get_connected_players()) do
|
||||||
if mcl_weather.is_underwater(player) or not mcl_worlds.has_weather(player:get_pos()) or not mcl_weather.has_snow(player:get_pos()) then
|
if mcl_weather.is_underwater(player) or not mcl_weather.has_snow(player:get_pos()) then
|
||||||
mcl_weather.remove_spawners_player(player)
|
mcl_weather.remove_spawners_player(player)
|
||||||
else
|
else
|
||||||
mcl_weather.snow.add_player(player)
|
mcl_weather.snow.add_player(player)
|
||||||
|
|
Loading…
Reference in New Issue