Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-166786

When you block an attack from mobs with shield, your "HurtTime" tag will still be changed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.14.4, 1.15 Pre-release 3, 1.15 Pre-release 4, 1.15 Pre-release 5, 1.15 Pre-release 6, 1.15 Pre-release 7, 1.15, 1.15.1, 1.15.1 Pre-release 1, 1.15.2 Pre-Release 1, 1.15.2 Pre-release 2, 1.15.2, 20w06a, 20w07a, 20w08a, 20w09a, 20w10a, 20w11a, 20w12a, 20w13a, 20w13b, 20w14a, 20w15a, 20w16a, 20w17a, 20w18a, 20w20b, 20w22a, 1.16 Pre-release 1, 1.16 Pre-release 2, 1.16 Pre-release 3, 1.16 Pre-release 4, 1.16 Pre-release 5, 1.16 Pre-release 7, 1.16 Pre-release 8, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a, 20w28a, 20w29a, 20w30a, 1.16.2 Pre-release 1, 1.16.2 Pre-release 2, 1.16.2 Pre-release 3, 1.16.2 Release Candidate 1, 1.16.2 Release Candidate 2, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4 Pre-release 1, 1.16.4 Pre-release 2, 1.16.4 Release Candidate 1, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5 Release Candidate 1, 1.16.5, 21w05a, 21w05b, 21w06a, 21w07a, 21w08a, 21w10a, 21w11a, 21w13a, 21w14a, 21w15a, 21w16a, 21w17a, 21w18a, 21w19a, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 3, 1.17 Pre-release 4, 1.17 Release Candidate 1, 1.17 Release Candidate 2, 1.17, 1.17.1, 21w37a, 21w38a, 21w39a, 21w42a, 21w43a, 1.18 Pre-release 1, 1.18, 1.18.1, 22w06a, 1.18.2, 22w12a, 22w14a, 1.19.2, 1.19.3, 23w03a, 1.19.4 Pre-release 1, 1.20.1, 1.20.4, 23w51b, 24w05b, 24w14a, 1.20.5 Release Candidate 2, 1.21, 1.21.3, 1.21.4, 25w02a
    • None
    • Confirmed
    • Combat, Commands

      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"}

      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"

            Unassigned Unassigned
            BLack_Tea_RGO BLack_Tea_RGO
            Votes:
            10 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: