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

Can hit mobs with invincibility frames

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.19.4
    • None
    • Unconfirmed
    • (Unassigned)

      Expected Behaviour

      When you hit a mob, it cannot take any damage from player hits for 10 ticks. And every time it takes damage, its HurtTime NBT is set to 10.

      Actual Behaviour

      When you spamhit a player or a mob, sometimes it gets damaged way too soon. This can be detected with scoreboards (minecraft.custom:minecraft.damage_dealt) or advancements (player_hurt_entity). When a mob is hit in this manner and takes damage when it shouldn't, no damage sounds play, and the HurtTime NBT doesn't get set to 10, making it impossible to detect with commands which mob got attacked.

      How To Reproduce

      Set up command blocks like in this Twitter Clip and spamhit an entity.

      Edit:
      This is likely caused by dealing a small amount of damage first, then dealing a little bit more damage in the same tick. So it's likely intended behaviour, but I can't delete the bugreport anymore. Sorry

            Unassigned Unassigned
            SilicatYT SilicatYT
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: