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

"translate" text component in functions seems to be caching output on first execution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.13-pre9
    • None
    • Unconfirmed

      When you execute a /tellraw command in a function, containing a "translate" text component, the result seems to be stored and will be used for later executions for the same command. While this is smart, it's problematic when the command contains for example a score.

      Demonstration

      1. Download the bug-demo-dp.zip data pack, put it in your datapacks folder and activate it. The data pack is supposed to print the amount of loaded item entities currently in the world.
      2. Drop items in the world. Notice how the same amount is printed on every execution. This is the command: 
        tellraw @a {"translate":"%s","with":[{"score":{"name":"#items","objective":"demo"}}]}
      3. Execute this command: 
        /scoreboard players set #no_translate demo 1
      4. Once again, drop items. Notice how different amounts are printed every time. This is the command that's running now: 
        tellraw @a {"score":{"name":"#items","objective":"demo"}}
      5. That's it! In theory, both tellraw commands should output the exact same thing.

            Unassigned Unassigned
            DyamicFleyer Dyamic Fleyer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: