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

Damage rules does not store the correct damage taken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.19.3, 1.19.4 Pre-release 1, 1.19.4 Pre-release 3, 1.19.4, 23w17a, 1.20.1, 23w33a
    • None
    • Windows 11, Java 8 build 1.8.0_311-b11
    • Unconfirmed
    • (Unassigned)

      The damage rules does not appear to store the actual value received by the player, but the not clamped value. This is notable when dealing an amount of damage that would otherwise be negative (such as instant damage level 29b)

       

      How to Reproduce:

      1: In a entity with healt, apply instant damage (via any method) with amplifier equal to 29b with a duration of 1 tick (preferred)

      2: Deal any type of common damage to the entity (eg: punch the entity with your hand)

      You will notice that after applying the effect, the entity will receive 0 damage and do the damage animation. however, after hitting the entity, you will notice that the entity will take a deadly amount of damage (in my tests, the punch dealt 1.1E9 damage)

       

      Remembering that the damage taken during damaged cooldown are the current damage based on the difference between the highest previous damage (within the hurttime duration) and the current damage IF the result of this is greater than 0.

      With that said, what is probably happening is that the entity received negative damage, the final damage was clamped and set to 0 but the damage rules stored that negative damage.

       

      This can only be caused by a flaw in the damage rules logic, which is not storing the actual final damage. 

       

      This bug has been in minecraft for a long time and I think it affects all versions of the game.

            Unassigned Unassigned
            nodeee nodeee
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: