-
Bug
-
Resolution: Fixed
-
Minecraft 15w51b, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.2, Minecraft 16w15b, Minecraft 16w21b, Minecraft 1.11, Minecraft 1.12.2, Minecraft 18w21a, Minecraft 1.13-pre7, Minecraft 1.13, Minecraft 18w30b, Minecraft 1.13.1-pre1, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w50a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, 1.14.4, 19w34a, 19w35a, 19w39a, 1.15.1
-
Confirmed
-
Mob behaviour
The bug
When an enderman is aggressive and starts teleporting randomly at day it becomes passive and still teleports randomly during night.
How to reproduce
- Set the time to night
- Build a two block high tower and stand on it
- Spawn an enderman next to you
- Switch to survival mode and look at the enderman
- Set the time to day
- Wait until the enderman stops being aggressive
→ When you look at the enderman it will not become aggressive anymore
Code analysis
Based on 1.12 decompiled using MCP 9.40 PRE 1
It looks like the problem is that the field net.minecraft.entity.ai.EntityAINearestAttackableTarget.targetEntity is not reset when net.minecraft.entity.EntityLiving.attackTarget is null. This is the case if it is day and an enderman tried to attack a player for 30 seconds. However, changing this might have unexpected side effects.
- is duplicated by
-
MC-106475 Hostile endermen teleport to you after exposed to sunlight for a while
- Resolved
-
MC-120849 Enderman and the player when fighting
- Resolved
-
MC-146136 Enderman becomes passive when sunlight comes
- Resolved
-
MC-168529 Endermen completely peaceful during day
- Resolved
- relates to
-
MC-7980 Enderman teleportation and behaviour irregular
- Resolved
-
MC-19138 Enderman appears passive when it attacks someone
- Resolved
-
MC-160053 Enderman keeps following the player after becoming neutral/passive
- Resolved
-
MC-96946 Enderman keep follow player in creative mode
- Resolved
-
MC-145802 Enderman never attacking again once you put on creative mode and back to survival
- Resolved