forked from VoxeLibre/VoxeLibre
Fix endermen teleporting in the rain in the end per issue #1169.
This commit is contained in:
parent
73616453a4
commit
2ace4ccc68
|
@ -242,6 +242,8 @@ mobs:register_mob("mobs_mc:enderman", {
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
-- RAIN DAMAGE / EVASIVE WARP BEHAVIOUR HERE.
|
-- RAIN DAMAGE / EVASIVE WARP BEHAVIOUR HERE.
|
||||||
|
local dim = mcl_worlds.pos_to_dimension(enderpos)
|
||||||
|
if dim == "overworld" then
|
||||||
if mcl_weather.state == "rain" or mcl_weather.state == "lightning" then
|
if mcl_weather.state == "rain" or mcl_weather.state == "lightning" then
|
||||||
local damage = true
|
local damage = true
|
||||||
local enderpos = self.object:get_pos()
|
local enderpos = self.object:get_pos()
|
||||||
|
@ -272,6 +274,7 @@ mobs:register_mob("mobs_mc:enderman", {
|
||||||
self:teleport(nil)
|
self:teleport(nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
else return end
|
||||||
-- AGRESSIVELY WARP/CHASE PLAYER BEHAVIOUR HERE.
|
-- AGRESSIVELY WARP/CHASE PLAYER BEHAVIOUR HERE.
|
||||||
if self.state == "attack" then
|
if self.state == "attack" then
|
||||||
--if (minetest.get_timeofday() * 24000) > 5001 and (minetest.get_timeofday() * 24000) < 19000 then
|
--if (minetest.get_timeofday() * 24000) > 5001 and (minetest.get_timeofday() * 24000) < 19000 then
|
||||||
|
|
Loading…
Reference in New Issue