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

@s selector doesn't work in /data commands

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 1.14.2 Pre-Release 2
    • None
    • Unconfirmed
    • Commands

      You need a sign and an entity to test this commands.

      Replace <pos of sign> with the coords of your sign.

       

      /execute as @e[type=!minecraft:player,limit=1,sort=nearest] run data merge block <pos of sign> {Text1:'{"extra":[{"text":"Name: "},{"selector":"@s"}],"text":""}'}

       

      /execute as @e[type=!minecraft:player,limit=1,sort=nearest] run data modify block <pos of sign> Text1 set value '{"extra":[{"text":"Health: "},{"nbt":"Health","entity":"@s"}],"text":""}'

       

            Unassigned Unassigned
            FACS01 FACS01
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: