Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / EntityPredicateSpec

Interface: EntityPredicateSpec โ€‹

Defined in: core/values/predicate/types/entity.ts:67

The body of an entity_properties check. Fields are only emitted when set.

Properties โ€‹

components? โ€‹

optional components?: Record<string, unknown>

Defined in: core/values/predicate/types/entity.ts:107

Exact data component values, keyed by component id. 1.21.5+.

Raw JSON: helix has no typed entity components yet.


distance? โ€‹

optional distance?: DistanceSpec

Defined in: core/values/predicate/types/entity.ts:93

Distance from the origin of the check.


effects? โ€‹

optional effects?: EffectSpec[]

Defined in: core/values/predicate/types/entity.ts:95

Active effects; all must match.


entityTags? โ€‹

optional entityTags?: object

Defined in: core/values/predicate/types/entity.ts:101

Scoreboard tags. 26.2+; before that use Selector.tag.

allOf? โ€‹

optional allOf?: string[]

anyOf? โ€‹

optional anyOf?: string[]

noneOf? โ€‹

optional noneOf?: string[]


equipment? โ€‹

optional equipment?: EquipmentSpec

Defined in: core/values/predicate/types/entity.ts:77

Item match per equipment slot - each built from the same ItemValue you'd give.


flags? โ€‹

optional flags?: EntityFlags

Defined in: core/values/predicate/types/entity.ts:75

Boolean state flags.


location? โ€‹

optional location?: LocationSpec

Defined in: core/values/predicate/types/entity.ts:87

Where the entity is.


movement? โ€‹

optional movement?: MovementSpec

Defined in: core/values/predicate/types/entity.ts:97

Movement last tick. Speeds are in blocks per second. 1.21+.


movementAffectedBy? โ€‹

optional movementAffectedBy?: LocationSpec

Defined in: core/values/predicate/types/entity.ts:91

The block up to 0.5 below the entity that affects its movement. 1.21+.


nbt? โ€‹

optional nbt?: NbtValue

Defined in: core/values/predicate/types/entity.ts:71

NBT match. Use Nbt so embedded values render for the version.


passenger? โ€‹

optional passenger?: EntityPredicateSpec

Defined in: core/values/predicate/types/entity.ts:115

What is riding the entity (a nested entity predicate).


periodicTick? โ€‹

optional periodicTick?: number

Defined in: core/values/predicate/types/entity.ts:99

True every n ticks of the entity's life. 1.21+.


predicates? โ€‹

optional predicates?: Record<string, unknown>

Defined in: core/values/predicate/types/entity.ts:109

Data component sub-predicates, keyed by type. 1.21.5+. Raw JSON, as components.


slots? โ€‹

optional slots?: Partial<Record<SlotRange, ItemValue>>

Defined in: core/values/predicate/types/entity.ts:85

Item match per slot range, replacing nbt={Inventory:[...]} scans (which broke with components).

Passes if any slot in the range matches. Use SLOTS: an unknown slot name makes the engine reject the whole file.


steppingOn? โ€‹

optional steppingOn?: LocationSpec

Defined in: core/values/predicate/types/entity.ts:89

The block the entity stands on. 1.17+.


targetedEntity? โ€‹

optional targetedEntity?: EntityPredicateSpec

Defined in: core/values/predicate/types/entity.ts:117

What the mob is targeting.


team? โ€‹

optional team?: string

Defined in: core/values/predicate/types/entity.ts:73

Team name.


type? โ€‹

optional type?: IdList<EntityType>

Defined in: core/values/predicate/types/entity.ts:69

Entity type id, tag, or a list (1.20.5+), e.g. EntityType.ZOMBIE.


typeSpecific? โ€‹

optional typeSpecific?: TypeSpecificSpec

Defined in: core/values/predicate/types/entity.ts:111

A check for one kind of entity (player, raider, slime, ...). 1.19+.


vehicle? โ€‹

optional vehicle?: EntityPredicateSpec

Defined in: core/values/predicate/types/entity.ts:113

What the entity is riding (a nested entity predicate).

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.