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

Asterisk as Name for Score Chat Component Not Effective as Translatable Argument

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 14w07a, Minecraft 14w08a, Minecraft 14w10b, Minecraft 14w10c, Minecraft 14w11b, Minecraft 1.7.9, Minecraft 14w17a, Minecraft 14w18b, Minecraft 14w19a, Minecraft 14w20b, Minecraft 14w21a, Minecraft 14w21b
    • None
    • OS: Windows 8
      Java: Version 7 Update 17
      Processor: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
      Installed memory (RAM): 12.0 GB
      System type: 64-bit Operating System, x64-based processor
    • Unconfirmed

      In the tellraw command's JSON message when * is used as the name in a score component it is not replaced when it's an argument for translatable component. It is expected to be replaced with the player's name that receives the message.

      This can be recreated by doing the following:

      1. /scoreboard objectives add test dummy
      2. /scoreboard players set @p test 501
      3. /tellraw @p {translate:"commands.seed.success",with:[{score:{name:"*",objective:"test"}}]}

      The * is treated as a player and if you don't have a score for * then a "?" is shown.
      I encountered this bug when I was trying to insert a value into a custom translation key. Specifically:

      tellraw @a[score_trading_min=1] 
      {
        translate:"trading.offer.oneItem",
        with:[
          {
            translate:"resources.wheatAmount",
            with:[
              {
                score:{
                  name:"*",
                  objective:"wheatOffer"
                }        
              }
            ],
            color:"yellow"
          }
        ],
        color:"gray"
      }
      

      After this predicament I decided to check out the code and make a mod to fix it. Which you can download for yourself here (14w10c). Installation Intructions

            searge [Mojang] Searge (Michael Stoyke)
            pau101 Paul Fulham
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: