Skip to content

Set Resource (Integer)

Sets the value of a power that uses the Resource Int power type.

Type ID: kaya:set_resource/int

Format

Field Type Default Description
power Power Identifier The resource power to set the value of.
entity Entity Provider The entity to get the power from.
value Int Provider The integer value to use.

Example

{
    "type": "kaya:set_resource/int",
    "power": "example:resource_awesome_sauce",
    "entity": "this",
    "value": {
        "type": "kaya:random/uniform",
        "min": 0,
        "max": 100
    }
}

This example will set the value of the example:resource_awesome_sauce power from the entity provided by the kaya:this_entity context parameter to a random integer value ranging from 0 to 100.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.