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

minecraft.custom:minecraft.damage_resisted scales improperly



    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.14.4
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
    • Category:


      Depending on the damage source, the scaling used in the scoreboard varies by a significant margin. While the use of scaling is consistent with Health being stored as a float (eg, 1 damage resisted would actually equal 1.0 damage resisted), how much the damage is scaled seems to be affected by the source of damage. From this, what should be the same amount of damage resisted will result in different scores.

      For example:

      • Potion and environmental damage (such as fall damage) are scaled by 10 (1 damage = 10 score)
      • Mob damage (such as getting attacked by a zombie) is scaled by 5 (1 damage = 5 score)
      • Player damage (such as in a PvP scenario) is scaled by 40 (1 damage = 40 score)

      To reproduce:

      1. Create a minecraft.custom:minecraft.damage_resisted scoreboard, such as:
        scoreboard objectives create resist minecraft.custom:minecraft.damage_resisted
      2. Grant the player an excessively long 100% resistance effect, such as:
        effect give @a resistance 1000000 127
      3. Set the sidebar to the scoreboard objective for easy observation of changes, such as:
        scoreboard objectives setdisplay sidebar resist
      4. Get a second player participant.
      5. Give the first player instant damage with no amplifier (6.0 damage). The affected player will have a score of 60.
      6. Clear the player's score, such as:
        scoreboard players set @a resist 0
      7. Summon a zombie with a generic.attackDamage of 6 (~6.0 damage). Allow the zombie to attack the first player once. The affected player will have a score of ~30, despite resisting an equal amount of damage. An example zombie summon command would be:
        summon minecraft:zombie ~ ~ ~ {Attributes:[{Name:generic.attackDamage,Base:6}]}
      8. Clear the player's score.
      9. Have the second player attack the first player with exactly 6 fully-charged punches (~6.0 damage). The first player will have a score of ~240, despite taking an equal amount of damage.




            Unassigned Unassigned
            seeksery seeksery
            0 Vote for this issue
            0 Start watching this issue