FIND_ENTITIES
Finds all entities near a position.
Items count as entities too. Each ENTITY has uuid, type, name and position. radius must be 1 to 64, otherwise INVALID_ARGUMENT is raised.
Parameters and results
positionSTRUCT c0de/minecraft/POSITION: the center of the searchradiusINTEGER: the search radius in blocks, 1 to 64typeSTRING: only this entity type (optional, default empty for all types)- result
resultARRAY STRUCT c0de/minecraft/ENTITY: the entities found
Example
c0de
CALL c0de/minecraft/FIND_ENTITIES
PARAMETER position pen ;
PARAMETER radius 8 ;
PARAMETER type "minecraft:sheep" ;
RESULT result sheep