X

NOTICE

Are you sure you want to report this?

A feedback area designed for scripting and mods suggestions and feedback. Please note bug reports and support issues will be removed.

29

@n Selector for nearest entity

5 Comments

Post a new comment:

Please sign in to leave a comment.

  • 1
    Pe brito commented
    Comment actions Permalink

    So it's a shorter way of saying:
    @e[sort=nearest]
    Well, why not? Maybe there's some reason behind not implementing it, but it's a cool idea.

  • 0
    Comment actions Permalink

    Es mucho más cool

  • 0
    Vechrozilator commented
    Comment actions Permalink

    Use variable c and it equal to one this should target the nearest entity. Example kill @e[c=1] this will kill nearest entity.

  • 1
    Pascal Anema commented
    Comment actions Permalink

    this would work kind of like using @e[sort=nearest,limit=1] but excluding the entity executing the command, which I think is a brilliant idea. Because that would make it much faster to test things easily (I get very annoyed by always having to type "/data @e[type=...,sort=nearest,limit=1]" when it could just be "/data @n"!)

     

    I wanted to suggest this too, but without the addition of excluding @s from the command, but I think this is way better.

  • 0
    Pupqet6869 commented
    Comment actions Permalink

    There's no reason to add this except to be lazy when there's @e[sort=nearest,limit=1]