Skip to content

Difference

Subtracts all the number values and uses the difference as the provided number value.

Type ID: kaya:difference

Note

This number meta type can only provide the same kind of value of the field where it was used. (e.g: if the field is a float provider, the number provider to specify should be a float provider or if the field is an int provider, the number provider to specify should be an int provider)

Format

Field Type Default Description
values Array of Number Providers The numbers to get the difference from.

Example

{
    "type": "kaya:difference",
    "values": [
        {
            "type": "kaya:light_level",
            "position": {
                "type": "kaya:entity/position",
                "entity": "this"
            }
        },
        4
    ]
}

This example is an int provider that will subtract the light level relative at the feet of the entity provided by the kaya:this_entity context parameter by $4$ and provide it.

$(Value = LightLevel + 4)$

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.