minecraft.custom:minecraft.damage_dealt_absorbed doesn't track damage dealt to players
The bug
When doing damage to a player with absorption, the score, with criteria of minecraft.custom:minecraft.damage_dealt_absorbed, is supposed to increase but it is not. The same behaviour also occurs with the criteria minecraft.custom:minecraft.damage_dealt_resisted.
How to reproduce
- Get two players on a LAN world and make sure they are in survival
- Run the commands
/scoreboard objectives add damage_dealt minecraft.custom:minecraft.damage_dealt_absorbed /effect give @a minecraft:absorption 100000 14 true /scoreboard objectives setdisplay sidebar damage_dealt
- Hit a player with a sword and notice the score doesn't increase
- Unresolved
Adam
federick- 33
- 11
- Confirmed
Low
- Platform
- Commands
- criteria scoreboard
1.13.2 - 1.19
1.13.2 18w50a 19w08b 19w09a 19w11a 19w11b 19w12a 19w12b 19w13b 19w14a 1.14-pre2 1.14-pre3 1.14-pre4 1.14-pre5 1.14 1.14.2 1.14.3 1.14.4 19w37a 19w45b 1.15-pre2 1.15 1.15.2 20w06a 20w07a 20w08a 20w10a 20w12a 20w13b 20w14a 20w15a 20w16a 20w17a 20w18a 20w21a 1.16.1 1.16.2 1.16.3 1.16.4-pre1 1.16.4-pre2 1.16.4 20w45a 20w46a 20w48a 20w49a 20w51a 21w03a 1.16.5 21w05a 21w05b 21w08b 21w10a 21w11a 21w13a 21w16a 21w17a 21w18a 21w20a 1.17.1 21w37a 21w39a 21w41a 1.18-pre1 1.18-pre2 1.18 1.18.1 1.18.2-pre1 1.18.2 22w12a 22w15a 1.19
Created Issue:
minecraft.custom:minecraft.damage_dealt_absorbed doesn't track damage dealt to players
The bug:
When doing damage to a player with absorption, the score, with criteria of minecraft.custom:minecraft.damage_dealt_absorbed, is supposed to increase but it is not.How to reproduce:
1. Get two players on a LAN world and make sure they are in survival2. Run the commands:
/scoreboard objectives add damage_dealt minecraft.custom:minecraft.damage_dealt_absorbed
/effect give @a minecraft:absorption 100000 14 true
/scoreboard objectives setdisplay sidebar damage_dealt3. Hit a player with a sword and notice the score doesn't increase
The bug:
When doing damage to a player with absorption, the score, with criteria of minecraft.custom:minecraft.damage_dealt_absorbed, is supposed to increase but it is not.How to reproduce:
1. Get two players on a LAN world and make sure they are in survival2. Run the commands:
/scoreboard objectives add damage_dealt minecraft.custom:minecraft.damage_dealt_absorbed
/effect give @a minecraft:absorption 100000 14 true
/scoreboard objectives setdisplay sidebar damage_dealt3. Hit a player with a sword and notice the score doesn't increase
The bug
When doing damage to a player with absorption, the score, with criteria of minecraft.custom:minecraft.damage_dealt_absorbed, is supposed to increase but it is not.
How to reproduce
- Get two players on a LAN world and make sure they are in survival
- Run the commands
/scoreboard objectives add damage_dealt minecraft.custom:minecraft.damage_dealt_absorbed /effect give @a minecraft:absorption 100000 14 true /scoreboard objectives setdisplay sidebar damage_dealt- Hit a player with a sword and notice the score doesn't increase
The bug
When doing damage to a player with absorption, the score, with criteria of minecraft.custom:minecraft.damage_dealt_absorbed, is supposed to increase but it is not.
How to reproduce
- Get two players on a LAN world and make sure they are in survival
- Run the commands
/scoreboard objectives add damage_dealt minecraft.custom:minecraft.damage_dealt_absorbed /effect give @a minecraft:absorption 100000 14 true /scoreboard objectives setdisplay sidebar damage_dealt- Hit a player with a sword and notice the score doesn't increase
The bug
When doing damage to a player with absorption, the score, with criteria of minecraft.custom:minecraft.damage_dealt_absorbed, is supposed to increase but it is not.
How to reproduce
- Get two players on a LAN world and make sure they are in survival
- Run the commands
/scoreboard objectives add damage_dealt minecraft.custom:minecraft.damage_dealt_absorbed /effect give @a minecraft:absorption 100000 14 true /scoreboard objectives setdisplay sidebar damage_dealt
- Hit a player with a sword and notice the score doesn't increase
The bug
When doing damage to a player with absorption, the score, with criteria of minecraft.custom:minecraft.damage_dealt_absorbed, is supposed to increase but it is not.
How to reproduce
- Get two players on a LAN world and make sure they are in survival
- Run the commands
/scoreboard objectives add damage_dealt minecraft.custom:minecraft.damage_dealt_absorbed /effect give @a minecraft:absorption 100000 14 true /scoreboard objectives setdisplay sidebar damage_dealt
- Hit a player with a sword and notice the score doesn't increase
The bug
When doing damage to a player with absorption, the score, with criteria of minecraft.custom:minecraft.damage_dealt_absorbed, is supposed to increase but it is not.
How to reproduce
- Get two players on a LAN world and make sure they are in survival
- Run the commands
/scoreboard objectives add damage_dealt minecraft.custom:minecraft.damage_dealt_absorbed /effect give @a minecraft:absorption 100000 14 true /scoreboard objectives setdisplay sidebar damage_dealt- Hit a player with a sword and notice the score doesn't increase
The bug
When doing damage to a player with absorption, the score, with criteria of minecraft.custom:minecraft.damage_dealt_absorbed, is supposed to increase but it is not. The same behaviour also occurs with the criteria minecraft.custom:minecraft.damage_dealt_resisted.
How to reproduce
- Get two players on a LAN world and make sure they are in survival
- Run the commands
/scoreboard objectives add damage_dealt minecraft.custom:minecraft.damage_dealt_absorbed /effect give @a minecraft:absorption 100000 14 true /scoreboard objectives setdisplay sidebar damage_dealt- Hit a player with a sword and notice the score doesn't increase
relates to
is duplicated by
relates to
relates to
relates to
relates to
This is mentioned in MC-141826
The same issue occurs with the minecraft.custom:minecraft.damage_dealt_resisted objective.
Also this is confirmed for 19w11b.
Confirmed for 19w12a
Confirmed for 19w12b
Confirmed for 19w14a
Confirmed for 19w14b. Also could it be added to the bug report that this also occurs with the minecraft.custom:minecraft.damage_dealt_resisted objective?
Confirmed for 1.14 Pre-Release 2
Confirmed for 1.14 Pre-Release 3
Confirmed for 1.14.3 Pre-Release 2
Confirmed for 1.14.3
Confirmed for 1.14.4 Pre-Release 2
Confirmed for 1.14.4
Confirmed for 19w37a
Confirmed for 19w42a
Confirmed for 19w44a
Confirmed for 19w45a
Confirmed for 19w45b
Confirmed for 1.15 Pre-Release 2
Confirmed for 1.15
Confirmed for 1.15.1
Confirmed for 1.15.2 Pre-Release 1
Confirmed for 20w06a
Confirmed for 20w07a
Confirmed for 20w10a
Confirmed for 20w12a
Confirmed for 20w13b
Confirmed for 20w14a
Confirmed for 20w15a
Confirmed for 20w16a
Confirmed for 20w17a
Confirmed for 20w18a
Confirmed for 20w21a
Confirmed for 1.16 Pre-Release 6
Confirmed for 1.16.1
Changed reporter to Adam.
Can confirm in 21w03a.
Can confirm in 21w10a. Video attached.
Can confirm in 1.17.1.
Can Confirm in 1.18 - 1.19
Can confirm in 1.20.4
Code Analysis (Mojang Mappings, 1.20.6):
For minecraft.custom:minecraft.damage_dealt_absorbed:
This happens because the Player class overrides the actuallyHurt with similar behaviour but doesn't include the code for awarding the minecraft.custom:minecraft.damage_dealt_absorbed stat.
Suggested fix:
For minecraft.custom:minecraft.damage_dealt_resisted the stat is only not awarded when attacking player entities, because of an incorrect use of an else if in LivingEntity#getDamageAfterMagicAbsorb.
Suggested fix: