Skip to content

Int

Compares two integers.

Type ID: kaya:int

Format

Field Type Default Description
comparator Comparator Determines how the integers are compared.
first Int Provider The first integer to compare to.
second Int Provider The second integer to be compared.

Example

{
    "type": "kaya:int",
    "comparator": ">=",
    "first": {
        "type": "kaya:count_in_area",
        "area": {
            "type": "kaya:radius",
            "target": "entity",
            "shape": "cube",
            "position": {
                "type": "kaya:entity/position",
                "entity": "this"
            },
            "radius": 16.0
        },
        "condition": {
            "type": "kaya:check_entity_type",
            "key": "minecraft:creeper",
            "entity": "entity_in_area"
        }
    },
    "second": 8
}

This example checks if the count of Creepers within a 16 block cubical radius relative to the entity provided by the kaya:this_entity context parameter is greater or equal to 8.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.