In general, when you are hurt(mobs attack, shot, poison, wither, burn, drown and more), your "HurtTime" nbt tag will become 10(you will turn red) and reduce to 0(return to normal color) after a half second.
But when you block a attack from a mob with shield, you are not hurt and you didn't turn red, but your "HurtTime" nbt tag will still become 10, in other words, the damage determination system still think you are hurt, even if you block it with shield.
For example, the selector "@a[nbt={HurtTime:9s}]" will select all players who turn red due to hurt, so you can put this command into a repeating command block and activate it
/execute as @a[nbt={HurtTime:9s}] run tellraw @s {"text":"You are hurt"}/execute as @a[nbt={HurtTime:9s}] run tellraw @s {"text":"You are hurt"}This command will lead players are reminded by system when hurt
Then you can block a attack with shield, you didn't hurt and you can hear a thump, but you will still be reminded "You are hurt"
Linked issues
is duplicated by 1
Comments 0
No comments.