Wither with the NoAI:1b tag updates rotation if it is teleported. This update in rotation can be caused by attacking it or walking into it, which will cause the wither to look away from where you were when you punched it as soon as it is teleported. This change in rotation overrides the use of commands to change the wither's rotation.
This bug only affects the wither's rotation. To be clear, the way I tested this was by using the following command:
/execute as @e[type=wither] at @s run tp @s ~ ~ ~
Using this command after attacking the wither causes the wither to face away from where the player was when they attacked the wither. What's worse is that this rotation update overrides the use of commands to change the wither's rotation for a few seconds, making it impossible to correct.
Steps to Reproduce:
- Summon a No AI wither:
/summon wither ~ ~ ~ {NoAI:1b}
- Place down a repeating command block that runs the following command:
/execute as @e[type=wither] at @s run tp @s ~ ~ ~
- Punch the wither
→ Whenever the wither is punched, it will face away from the player.
Using the command, /execute as @e[type=wither] at @s run tp @s ~ ~ ~ ~5 ~, the wither will rotate 5 degrees clockwise until it is punched, in which case it will stop rotating when it faces away from the player for a few seconds.
This test shows some problems map-makers may face from this:
- Summon a No AI wither.
- Place down a repeating command block that runs the following command: /execute as @e[type=wither] at @s run tp @s ^ ^ ^.3 ~5 ~
- Punch the wither
The wither will go in circles until it is punched, in which case it will fly away from the player for a few seconds before the rotation part of the command kicks in again.
Clearly, a mob with no AI should not be updating its rotation like this, and it certainly should not be overriding rotation changes from commands. I hope this is soon fixed.