Resource (Integer)
Provides an integer variable with customizable minimum, maximum, and start values.
Type ID: kaya:resource/int
Format
| Field | Type | Default | Description |
|---|---|---|---|
min |
Int Provider | The minimum value of the resource. | |
max |
Int Provider | The maximum value of the resource. | |
start_value |
Int Provider | optional | If specified, this value will be used as the initial value of the resource. Otherwise, the minimum value will be the initial value of the resource. |
on_changed_action |
Action | optional | If specified, this action will be executed when the value of the resource has changed. |
min_action |
Action | optional | If specified, this action will be executed when the value of the resource is equal to its minimum value. |
max_action |
Action | optional | If specified, this action will be executed when the value of the resource is equal to its maximum value. |
Example
This example provides an integer-based resource with a minimum value of -20 and a maximum value of 80.
History
| Minecraft | Mod | Changelog |
| 1.21.5 | 0.1.0 | Added the type. |