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

When sign resolves 'selector', also generates unneeded 'insertion', 'clickEvent' and 'hoverEvent'

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14, Minecraft 1.14.1 Pre-Release 1, Minecraft 1.14.1 Pre-Release 2, Minecraft 1.14.1, Minecraft 1.14.2 Pre-Release 1, Minecraft 1.14.2 Pre-Release 2, Minecraft 1.14.2 Pre-Release 3, Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 1, Minecraft 1.14.3 Pre-Release 2, Minecraft 1.14.3 Pre-Release 3, Minecraft 1.14.3 Pre-Release 4, Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 1, Minecraft 1.14.4 Pre-Release 2, Minecraft 1.14.4 Pre-Release 3, Minecraft 1.14.4 Pre-Release 4, Minecraft 1.14.4 Pre-Release 5, Minecraft 1.14.4 Pre-Release 6, 1.14.4, 19w34a, 19w35a, 19w36a, 19w37a, 19w38b, 19w39a, 19w40a, 19w41a, 19w42a, 19w44a, 19w45b, 19w46b, 1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15 Pre-release 3, 1.15 Pre-release 4, 1.15 Pre-release 6, 1.15, 1.15.1, 1.15.1 Pre-release 1, 1.15.2 Pre-Release 1, 1.15.2 Pre-release 2, 1.15.2, 20w06a, 20w07a, 20w08a, 20w09a, 20w10a, 20w11a, 20w12a, 20w13a, 20w14a, 20w15a, 20w16a, 20w17a, 20w18a, 20w20a, 20w21a, 20w22a, 1.16 Pre-release 1, 1.16 Pre-release 3, 1.16 Pre-release 5, 1.16 Pre-release 6, 1.16 Pre-release 7, 1.16 Pre-release 8, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a, 20w28a, 20w29a, 20w30a, 1.16.2 Pre-release 1, 1.16.2 Release Candidate 1, 1.16.2, 1.16.3, 1.16.4 Pre-release 2, 1.16.4 Release Candidate 1, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 21w05b, 21w07a, 21w10a, 21w11a, 1.17, 1.17.1 Pre-release 1
    • None
    • Confirmed
    • Commands

    Description

      First I give myself a sign with some text and the selector element:

      /give FACS01 minecraft:oak_sign{BlockEntityTag:{Text2:'[{"text":"Tomb of "},{"selector":"@p"}]'}}

       and place it on the floor.

      Then I do F3+I over the sign to see its data:

      /setblock 7 50 -28 minecraft:oak_sign[rotation=0,waterlogged=false]{Color:"black",Text4:'{"text":""}',Text3:'{"text":""}',Text2:'{"extra":[{"insertion":"FACS01","clickEvent":{"action":"suggest_command","value":"/tell FACS01 "},"hoverEvent":{"action":"show_entity","value":{"text":"{name:\'{\\"text\\":\\"FACS01\\"}\',id:\\"cc2b020c-8fd2-4060-9cce-1a32ccc1996e\\",type:\\"minecraft:player\\"}"}},"text":"FACS01"}],"text":"Tomb of "}',Text1:'{"text":""}'}

       

      As you can see, 'insertion', 'clickEvent' and 'hoverEvent' are generated but they can't be used, they work only in the chat box. So much text is written into the sign just to use the name.

       

      With the bug fixed this would look like:

      /setblock 7 50 -28 minecraft:oak_sign[rotation=0,waterlogged=false]{Color:"black",Text4:'{"text":""}',Text3:'{"text":""}',Text2:'{"extra":[{"text":"FACS01"}],"text":"Tomb of "}',Text1:'{"text":""}'}

       

       

      If the selector targets an item on the floor (@e[limit=1,sort=nearest,type=!player]):

      /setblock 8 50 -29 minecraft:oak_sign[rotation=0,waterlogged=false]{Color:"black",Text4:'{"text":""}',Text3:'{"text":""}',Text2:'{"extra":[{"insertion":"da71d991-bf67-44ac-8f3b-c7414e0d9017","hoverEvent":{"action":"show_entity","value":{"text":"{name:\'{\\"translate\\":\\"item.minecraft.clock\\"}\',id:\\"da71d991-bf67-44ac-8f3b-c7414e0d9017\\",type:\\"minecraft:item\\"}"}},"translate":"item.minecraft.clock"}],"text":"Tomb of "}',Text1:'{"text":""}'}

       

      With the bug fixed this would look like:

      /setblock 8 50 -29 minecraft:oak_sign[rotation=0,waterlogged=false]{Color:"black",Text4:'{"text":""}',Text3:'{"text":""}',Text2:'{"extra":[{"translate":"item.minecraft.clock"}],"text":"Tomb of "}',Text1:'{"text":""}'}

       

       

      If the selector finds more than one entity, each one will have a set of 'insertion', 'clickEvent' and 'hoverEvent'.

      Attachments

        Activity

          People

            Unassigned Unassigned
            FACS01 Franco Caprile
            Votes:
            7 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              CHK: