Elementium Sign in

Nearest entity

The closest entity of a kind near a location, within some blocks. Found says if there was one.

Try it on your server

A Minecraft element (a value) in Entities & mobs. Needs the Basic plan or higher to go live; building and testing are free.

Example

When a player uses a command → Nearest entity minecraft:villager → If Found → Make it glow.

Also called

nearest, closest, find mob, find entity, near

Works as a data pack?

Partly. A data pack does most of it, and the editor tells you the difference.

What you give it

What it gives back

Related

All Minecraft elements