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

Signs are re-executing setblock commands as themselves at themselves.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 1.17.1
    • None
    • Java 8 Update 291
      Minecraft 1.17.1
      MacOS 11.4 (20F71)
    • Unconfirmed
    • (Unassigned)

      Just as command blocks can execute commands with predefined selected targets, so too should signs be able to.

      Example: perform this command either as datapack, command_block, or chat-interface:

      execute at @p run setblock 0 64 0 minecraft:oak_sign{Text1:'{"selector":"@s"}'} replace
      

      and the sign is re-executing the setblock command as itself at itself, the command is not finishing via the intended selected entity player, thus selector:@s means nothing to the sign because it's a block and not an entity, and it generates a blank sign.

      Within datapacks and command_blocks, a setblock may be required to create a sign in a position that is intended to be executed by a player who is not necessarily the closest player to the sign thus being created, which is why

      Text1:'{"selector":"@p"}'
      

      may not always be appropriate. Just as command blocks can execute commands with defined selected targets, so too should setblock for a sign be able to.

            Unassigned Unassigned
            Gatinh0 Scott Miller
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: