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

Hearts do not blink when regenerating (Cause identified in code)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 13w41a, Minecraft 13w42b, Minecraft 13w43a, Minecraft 1.7.1, Minecraft 1.7.2, Minecraft 13w48a, Minecraft 13w48b, Minecraft 13w49a, Minecraft 1.7.3, Minecraft 1.7.4, Minecraft 14w07a, Minecraft 1.7.5, Minecraft 14w11b, Minecraft 1.7.9, Minecraft 14w17a, Minecraft 14w18a, Minecraft 14w21b, Minecraft 14w26c, Minecraft 1.7.10, Minecraft 14w27b, Minecraft 14w29b, Minecraft 14w32a
    • Java 7 u 17 64 bit on Windows 8
    • Community Consensus
    • Survival

      In past versions of the game since regeneration was implemented in Beta 1.8 the hearts flash briefly to notify the player that a half heart has been regenerated. As of 13w41a, however, healing does not have the flash effect (hearts simply refill without flashing), making it hard to tell at a glance whether you are regaining health or not.

      Code cause (using MCP names for 1.7.10):
      The gui renderer renders a blink around the hearts by setting the client player's hurtResistantTime to 20 for damage and 10 for healing (so the hearts blink twice and once, respectively)
      The hurtResistantTime is set in EntityPlayerSP's setPlayerSPHealth method, which is called by a health update packet.
      HOWEVER, The DataWatcher that actually holds the health is updated through a SEPARATE packet S1CEntityMetadata. This results in a pseudo-race condition between the two packet types where, by the time the GuiIngame gets the new health from the clientside DataWatcher, hurtresistanttime is already at 9 or 8 so the GuiIngame skips the blink.

            Unassigned Unassigned
            williewillus williewillus
            Votes:
            21 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: