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.

20

@n Selector for nearest entity

4 Comments

Post a new comment:

Please sign in to leave a comment.

  • Avatar
    Pe brito commented

    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.

  • Avatar

    Es mucho más cool

  • Avatar
    Vechrozilator commented

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

  • Avatar
    Pascal Anema commented

    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.