c0de 0.3.0Diese Seite auf Deutsch

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

  • position STRUCT c0de/minecraft/POSITION: the center of the search
  • radius INTEGER: the search radius in blocks, 1 to 64
  • type STRING: only this entity type (optional, default empty for all types)
  • result result ARRAY 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