Skip to content

Reference

Invokes a condition file and returns its value.

Type ID: kaya:reference

Format

Field Type Default Description
value Identifier The ID of the condition to invoke.

Example

{
    "type": "kaya:reference",
    "value": "example:entity/is_in_water"//(1)!
}
  1. The location of the file is data/example/kaya/condition/entity/is_in_water.json with this as its contents:

    {
        "type": "kaya:compare",
        "comparison": {
            "type": "kaya:float",
            "comparator": ">",
            "first": {
                "type": "kaya:entity/fluid_height",
                "fluid_tag": "#minecraft:water",
                "entity": "this"
            },
            "second": 0.0
        }
    }
    

This example invokes the example:entity/is_in_water condition and returns its result.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.