aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/EnderMan.cpp
diff options
context:
space:
mode:
authorUs3ful"-Dev <somebodyaliveonearth@gmail.com>2026-03-10 04:05:56 +0100
committerGitHub <noreply@github.com>2026-03-09 22:05:56 -0500
commitc90a6bf5ab4d1d96ac510f7357c9618c2bf4bc77 (patch)
tree76abc56a003a426abfa5f0c7d84064ee26372dbe /Minecraft.World/EnderMan.cpp
parent5f777a7f45455641b9ff4bb534cadcf0f763b0a3 (diff)
Fixed Enderman, monster aggro in creative (#1051)
Fixed endermans by making a invulnerable check
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;