mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 20:03:45 +01:00
Better fix for enderman behavior
This commit is contained in:
parent
7cbeae00cc
commit
a3ab67cb55
@ -314,7 +314,7 @@ mcl_mobs.register_mob("mobs_mc:enderman", {
|
|||||||
-- RAIN DAMAGE / EVASIVE WARP BEHAVIOUR HERE.
|
-- RAIN DAMAGE / EVASIVE WARP BEHAVIOUR HERE.
|
||||||
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 then
|
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()
|
||||||
@ -345,7 +345,7 @@ mcl_mobs.register_mob("mobs_mc:enderman", {
|
|||||||
self:teleport(nil)
|
self:teleport(nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else return end
|
end
|
||||||
-- AGRESSIVELY WARP/CHASE PLAYER BEHAVIOUR HERE.
|
-- AGRESSIVELY WARP/CHASE PLAYER BEHAVIOUR HERE.
|
||||||
if self.state == "attack" then
|
if self.state == "attack" then
|
||||||
if self.attack then
|
if self.attack then
|
||||||
|
Loading…
Reference in New Issue
Block a user