aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/EnderMan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.World/EnderMan.cpp')
-rw-r--r--Minecraft.World/EnderMan.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Minecraft.World/EnderMan.cpp b/Minecraft.World/EnderMan.cpp
index e1231818..da469a3a 100644
--- a/Minecraft.World/EnderMan.cpp
+++ b/Minecraft.World/EnderMan.cpp
@@ -410,9 +410,14 @@ bool EnderMan::hurt(DamageSource *source, float damage)
if ( dynamic_cast<EntityDamageSource *>(source) != nullptr && source->getEntity()->instanceof(eTYPE_PLAYER))
{
- aggroedByPlayer = true;
+ if (!dynamic_pointer_cast<Player>(source->getEntity())->abilities.invulnerable)
+ {
+ aggroedByPlayer = true;
+ }
+ else setCreepy(false);
}
+
if (dynamic_cast<IndirectEntityDamageSource *>(source) != nullptr)
{
aggroedByPlayer = false;