1

I was recently trying out a few things in 1.17 and thought I'd start with displaying an entitys Pos[] with armorstand names. The problem is that I can't get selector argument to work in JSON format anymore, only "name".

data merge block -11 31 5 {Text1:'{"score":{"objective":"x_pos","selector":"@p"}}'}

That does not work, whilst it used to, but this does

data merge block -11 31 5 {Text1:'{"score":{"name":"__Myth_","selector":"@p","objective":"x_pos"}}'}

Any ideas?

1 Answer 1

1

Oops! You're mistaking the purpose of selector.

selector is used outside score to display the results of a target selector:

{"selector":"@p"}

If you want to display a score, you don't use selector inside of it. You instead put the selector as the name component:

{"score":{"name":"@p","objective":"x_pos"}}
1
  • Oh right, I reread the wiki and it does kinda state that. Was looking at an example someone wrote online that used selector as its own argument. Well anyways thank you
    – nisse26a
    Jun 18, 2021 at 15:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .