When you summon Guardians with the NoAI NBT tag set to 1, you’ll receive damage through its thorns effect.
What I expected to happen was...:
The AI-less Guardian shouldn’t be able to use its thorns effect.
What actually happened was...:
The AI-less Guardian is able to damage the player using its thorns effect
Steps to Reproduce:
1. Summon a Guardian using /summon Guardian ~ ~ ~ {NoAI:1}
2. Change the gamemode to survival and attack the guardian.
Any part of an entities behavior that is not implemented as part of the AI is not affected by the NoAI tag.