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

Text display entity always resolves text components at position 0 0 0 when summoned

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 23w06a, 1.19.4 Pre-release 1
    • None
    • Confirmed
    • Commands
    • Normal
    • Platform

      When a text display entity is summoned, it ignores both the execution context of the command and its own position when resolving the text components on it. Instead they are always resolved with a default position of 0 0 0.
      For comparison, sign blocks use their own position when resolving text components.

      How to reproduce

      1. Prepare the world by creating things to detect at 0 0 0

      /forceload add 0 0
      
      /summon marker 0 0 0 {CustomName:'"Fail 1"'}
      
      /setblock 0 0 0 command_block{CustomName:'"Fail 2"'}
      

      2. Summon the text display

      /summon text_display ~ ~ ~ {text:'[{"selector":"@e[sort=nearest,limit=1]"},", ",{"nbt":"CustomName","block":"~ ~ ~","interpret":true}]'}
      

      3. Compare what is displayed on the new entity with the output of the equivalent tellraw command. Expected is that they would match

      /tellraw @p [{"selector":"@e[sort=nearest,limit=1]"},", ",{"nbt":"CustomName","block":"~ ~ ~","interpret":true}]
      

            Unassigned Unassigned
            AmberW Amber
            Votes:
            12 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              CHK: