mojira.dev
MC-259840

uses of /damage with certain damage type and damage source cause death message with broken translation

With the release of /damage, players are now allowed to make any damage with any damage type from any source, but most death messages are not designed for these uses.

To reproduce death message:

  • Kill a LivingEntity with another entity as source, and the source is holding a named item, produce a death message with .item.

    • Example: Use /damage @s 100 minecraft:generic by @s when you are holding a named item, this generate death.attack.generic.item

  • Kill a LivingEntity without a source, and the dead entity that generating death message is attacked recently, produce a death message with .player.

    • Example: Use /damage @s 1 minecraft:generic by @s, and then /damage @s 100 minecraft:player_attack, this generate death.attack.player.player

  • Otherwise, produce a death message without .item or .player.

    • Example: Use /damage @s 100 minecraft:player_attack, this generate %1$s was slain by %2$s (death.attack.player)

The following death messages will broken when damage source isn't exist, they will print like %1$s was slain by %2$s, leaving their formatting string %1$s and %2$s not changed.

Key

Damage type

death.attack.player

player_attack

death.attack.mob

mob_attack, mob_attack_no_aggro, mob_projectile

death.attack.arrow

arrow

death.attack.trident

trident

death.attack.fireball

fireball

death.attack.thrown

thrown

death.attack.witherSkull

wither_skull

death.attack.thorns

thorns

death.attack.indirectMagic

indirect_magic

The following death messages are missing and their translation keys are printed.

Key

Damage type

death.attack.player.player

player_attack

death.attack.mob.player

mob_attack, mob_attack_no_aggro, mob_projectile

death.attack.trident.player

trident

death.attack.fireball.player

fireball

death.attack.thrown.player

thrown

death.attack.witherSkull.player

wither_skull

death.attack.thorns.player

thorns

death.attack.indirectMagic.player

indirect_magic

death.attack.explosion.player.player

player_explosion

death.attack.genericKill.player

generic_kill

death.attack.magic.item

magic

death.attack.wither.item

wither

death.attack.freeze.item

freeze

death.attack.cactus.item

cactus

death.attack.inFire.item

in_fire

death.attack.lava.item

lava

death.attack.hotFloor.item

hot_floor

death.attack.sweetBerryBush.item

sweet_berry_bush

death.attack.inWall.item

in_wall

death.attack.cramming.item

cramming

death.attack.lightningBolt.item

lightning_bolt

death.attack.drown.item

drown

death.attack.dryout.item

dryout

death.attack.fall.item

fall

death.attack.stalagmite.item

stalagmite

death.attack.anvil.item

falling_anvil

death.attack.fallingStalactite.item

falling_stalactite

death.attack.fallingBlock.item

falling_block

death.attack.flyIntoWall.item

fly_into_wall

death.attack.starve.item

starve

death.attack.explosion.item

explosion

death.attack.outOfWorld.item

out_of_world

death.attack.outsideBorder.item

outside_border

death.attack.generic.item

generic

death.attack.genericKill.item

generic_kill

Linked issues

Comments 2

Thanks, this report was helpful in understanding the details of the death message bugs. Since there are separate issues here, will move to MC-259813 / MC-259790

⚠️ Please do not add Affected Versions to resolved reports.

Have a look at the Resolution and the comments to see why this ticket has been resolved. If you think this ticket has been resolved erroneously you can contact the Mojira staff on Discord or Reddit.

-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit

siiftun1857

(Unassigned)

Confirmed

Platform

Normal

Commands

23w06a

Retrieved