Skip to content

Condition

Conditions are used to test against a given context, checking the provided information and return either a pass or fail.

Custom conditions can be defined as JSON/JSON5/JSONC files in the data/<namespace>/kaya/condition directory of a data pack. Data packs that load later with a condition file with the same name and directory will replace the existing condition.

Note

Some conditions require certain context parameters to function properly. Make sure to check the page for the desired condition type for more information.

Format

Field Type Default Description
type Identifier The identifier of the desired condition type.
Tip

Specifying a boolean will implicitly use the constant condition type.

Meta types

Types