Rovers now take damage and teleport away when it is thundering.

And fix somewhere else that ignored thunder.
This commit is contained in:
seventeenthShulker 2024-06-15 21:12:44 +01:00 committed by the-real-herowl
parent 253a06fa08
commit 2ae7536038
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ function mcl_burning.is_burning(obj)
end end
function mcl_burning.is_affected_by_rain(obj) function mcl_burning.is_affected_by_rain(obj)
return mcl_weather.get_weather() == "rain" and mcl_weather.is_outdoor(obj:get_pos()) return mcl_weather.rain.raining and mcl_weather.is_outdoor(obj:get_pos())
end end
function mcl_burning.get_collisionbox(obj, smaller, storage) function mcl_burning.get_collisionbox(obj, smaller, storage)

View File

@ -157,7 +157,7 @@ mcl_mobs.register_mob("mobs_mc:rover", {
local enderpos = self.object:get_pos() local enderpos = self.object:get_pos()
local dim = mcl_worlds.pos_to_dimension(enderpos) local dim = mcl_worlds.pos_to_dimension(enderpos)
if dim == "overworld" then if dim == "overworld" then
if mcl_weather.state == "rain" or mcl_weather.state == "lightning" then if mcl_weather.rain.raining then
local damage = true local damage = true
local enderpos = self.object:get_pos() local enderpos = self.object:get_pos()
enderpos.y = enderpos.y+2.89 enderpos.y = enderpos.y+2.89