-
Bug
-
Resolution: Fixed
-
Minecraft 1.8.8, Minecraft 15w36b, Minecraft 15w36c, Minecraft 15w36d, Minecraft 15w37a, Minecraft 15w38a, Minecraft 15w38b, Minecraft 15w45a, Minecraft 1.8.9, Minecraft 15w51b, Minecraft 16w02a, Minecraft 16w06a, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.9.3 Pre-Release 3, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 16w21a, Minecraft 16w21b, Minecraft 1.10 Pre-Release 1, Minecraft 1.10 Pre-Release 2, Minecraft 1.10, Minecraft 1.10.1, Minecraft 1.10.2, Minecraft 16w43a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11, Minecraft 1.11.2, Minecraft 1.12 Pre-Release 6, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w50a, Minecraft 18w05a, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13
-
None
-
Confirmed
The bug
When summoning a slime with the Tag NoAI:1b it can still damage the player.
How to reproduce
- /difficulty hard
- /summon slime ~ ~ ~ {Size:3,NoAI:1b}
- /gamemode survival
- Walk into the slime and die a slimy death
Video: https://youtu.be/ZkI3uU7hoBA?t=2m33s
Fix
Having in mind the overall AI-System this is a hack. See note below.
There is a method canDamagePlayer() in EntitySlime.java. A check can simply be added there.
... protected boolean canDamagePlayer() { // Added && !this.isAIDisabled() return this.getSlimeSize() > 1 && !this.isAIDisabled(); } ...
@EDIT I didn't find MC-67667 somehow. Searges comment declares it as "Won't fix".
I still think this should be changed as damaging logically would be part of the AI, even if it's not directly inside the AI code.
Note: As Torabi pointed out in his comment, this is probably not so much viewed as "Won't fix", but rather will likely get fixed properly in future by moving this part of entity behaviour to the AI-Code.
Looking at it, it looks like a simple task at the beginning, but soon you realize that it probably would make sense to relocate the EntitySlime in the class hierarchy and I think form there it will feel like this soon. It's understandable why it gets ranked less important than other issues for now.
- is duplicated by
-
MC-87590 NoAi Slime does damage
- Resolved
-
MC-95792 NoAI&friendlyfire-false Slime/LavaSlime attack
- Resolved
-
MC-97293 Slime attacks with NoAI:1
- Resolved
- relates to
-
MC-65664 Squid and Ghasts with NoAI affected by knockback (& gravity for Squid)
- Resolved
-
MC-67667 Slime's still damage you on NoAI
- Resolved
-
MC-75089 Slimes do not use the slot.weapon for attacks
- Resolved
-
MC-105099 Slimes & Magma Cubes can still attack players when they are in their death animation
- Resolved
-
MC-173091 Piglins with the "NoAI" tag set to 1b does not dismount the entity they are riding
- Resolved