Skip to content

Selector

Provides an entity from a target selector.

Type ID: kaya:selector

Warning

The specified target selector can only select a single entity. Use the limit target selector argument and set its value to 1. (e.g: limit=1)

Format

Field Type Default Description
selector Target Selector The target selector to get an entity from.

Example

{
    "type": "kaya:selector",
    "selector": "@e[sort = random, limit = 1]"
}

This example selects a random entity from the world.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.