Resource (Float)
Provides an float variable with customizable minimum, maximum, and start values.
Type ID: kaya:resource/float
Format
| Field | Type | Default | Description |
|---|---|---|---|
min |
Float Provider | The minimum value of the resource. | |
max |
Float Provider | The maximum value of the resource. | |
start_value |
Float 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 0.1 and a maximum value of 6.7.
History
| Minecraft | Mod | Changelog |
| 1.21.5 | 0.1.0 | Added the type. |