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.
EntitySlime.java (in MCP)
...
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.
:info: Note: As @unknown 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.
Linked issues
is duplicated by 3
relates to 4
Comments 30
It's not "unfixable" as Panda has showed... and has even done himself (he fixed it on his own in the video you probably didn't watch...)
That being said there is very good reason for this to be fixed. There have been multiple occasions as a map maker that I have needed an invisible mob of any size to detect player clicks for instance. The main thing to remember is slimes are exceptionally good for map making because of the fact they can be any size. That is so powerful and the only problem at the moment is you can't use them... Because whenever it gets near a player the player dies... Not great as a map maker.
Also might I just say, it doesn't make any sense. Every single mob does damage through AI except slimes... noAI stops every mob damaging you... except slimes. For consistency this should be implemented. The fact that many people have suggested it just goes to show that even though it does not fit to mojang's definition of a bug, to the rest of the community it is. Therefore, at least in my opinion, it should be fixed or another work around added.
Hm, normally any "NoAI" bug get's resolved as invalid due to Mojang's Won't_fix_any_NoAI_bug policy, but since the fix is already provided here, this may remain open.
Thank you Kumasasa (my favourite Mod ๐ธ), cool decision!
I just wanted to add that I do a lot of custom creations with ArmorStands and mobs, and Slimes are the ONLY mob (at the moment at least) which can be made ANY size!
It could be SO useful for mapmakers or creationists if it wouldn't hurt you!
I set myself into a team "blue" and summoned a Slime for team "blue" (in 1.9:
/summon Slime ~ ~1 ~ {Size:1,Team:"blue"}
), but it still could hurt me..
Mobs in the same team should not be able to attack you.
Not sure if I did something wrong, but my quick testteaming returned as a fail, maybe someone more awake than me could quickly check that, thank you };]
Setting their generic.attackDamage also doesn't seem to work: MC-47091
As for the "`NoAI` bug get's resolved as invalid due to Mojang's Won't_fix_any_NoAI_bug policy" (I've read Mr. Stoyke's statement about that):
If one gets features into the game one expects them to work as intended for everything.
The question is if a "works differently" is REALLY intended, or if it's just a statement to have an official "excuse" for it because there are other problems which are more important to Mojang, hence they don't want to spend time trying to fix such issues like e.g. the NoAI-problem with slimes.
Don't misunderstand me, this is not a bashing of the Devs or anything, but I just have the feeling that sometimes they hide their reasoning for some decisions under statements like these, and it would annoy or upset people less if they'd get a truthful, open answer.
Because it can feel frustrating if you put your heart into this game, creating things for others to enjoy, then also try to help find the bugs, but then get replies like these.
I hope it's understandable what I mean, and I only had to mention it because I know a couple of people feel the same, and I always try to excuse such statements with the "there are things you're not ought to know" delusion to not get upset };]
But that's only me, as I said, there are others, and I cannot tell them not to get frustrated and to not give up on the bugfinding help etc. completely, and as the community is very dear to me, I'd like to have a REAL explanation, so I'm able to calm down those being upset about such kinds of statements.
So if we could have a more detailed statement from Mojang WHY this is a "works as intended", even more if they won't implement Panda's fix suggestion, that'd be great.
Sorry for the lengthy and slightly offtopic post, but I had to get that off my chest finally.
Regards, Meri
Thank you Kumasasa (my favourite Mod ๐ธ)
๐
cool decision!
That's the difference between tin ass @unknown and me.
Affects 17w50a, also as mod Torabi mentioned that it gets fixed in the future, one can almost say that time is now, the technically better update is already happening.
Unfixable per Searge on MC-67667: