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

/damage can provide fewer variables to death message than expected, printing unformatted message

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 23w06a, 23w07a, 1.19.4 Pre-release 1, 1.19.4 Pre-release 2, 1.19.4 Pre-release 3, 1.19.4 Release Candidate 1, 1.19.4 Release Candidate 2, 1.19.4, 23w12a, 23w13a, 23w14a, 23w16a, 23w17a, 23w18a, 1.20 Pre-release 2, 1.20 Pre-release 3, 1.20 Pre-release 4, 1.20 Pre-release 5, 1.20 Pre-release 6, 1.20 Pre-release 7, 1.20 Release Candidate 1, 1.20, 1.20.1, 23w43b, 23w44a, 1.20.4, 24w14a, 1.21.1, 24w36a
    • Confirmed
    • Commands, Text
    • Normal
    • Platform

      The bug:

      Some damage type death messages expect two variables for the translation: one for the victim and one for the killer. In vanilla, this always works fine, but with /damage, it's possible to deal damage of this type without a killer. In this case, due to the recent changes to out of bounds variables, the message is printed without any variable substitution.

      How to reproduce:

      /damage @s 30 fireball
      
      • Prints "%1$s was fireballed by %2$s"

      Expected result:

      • The message should output either: "[username] was fireballed by a command" or "[username] was fireballed by %2$s"

        1. 23w06a Bug.mkv
          8.24 MB
        2. weird death messages.png
          weird death messages.png
          188 kB
        3. 2023-02-09 17-45-00.mp4
          1.01 MB

            Unassigned Unassigned
            SeaGlowingPro SeaGlowingPro
            Votes:
            17 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              CHK: