Fix endermen teleporting in the rain in the end per issue #1169.

This commit is contained in:
MysticTempest 2021-02-25 21:48:37 -06:00
parent 73616453a4
commit 2ace4ccc68
1 changed files with 29 additions and 26 deletions

View File

@ -242,6 +242,8 @@ mobs:register_mob("mobs_mc:enderman", {
})
end
-- 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
local damage = true
local enderpos = self.object:get_pos()
@ -272,6 +274,7 @@ mobs:register_mob("mobs_mc:enderman", {
self:teleport(nil)
end
end
else return end
-- AGRESSIVELY WARP/CHASE PLAYER BEHAVIOUR HERE.
if self.state == "attack" then
--if (minetest.get_timeofday() * 24000) > 5001 and (minetest.get_timeofday() * 24000) < 19000 then