-
Notifications
You must be signed in to change notification settings - Fork 4
Adding HealingItem behavior
Important
Make sure to familiarize yourself with the library's syntax: Attribute‐based Matching
Allows you to make custom healing item from attribute-typed item / block (held).
Add the following behavior:
Note
Everything listed below can only be used in behavior's own properties
Better examples will appear once base game documentation gets better examples
Health
How many health points to add.
Example:
"health": {
"key-value": 2,
"key2-value2": 7
}ApplicationTimeSec
How long in real-time seconds it should take to apply the healing item.
Example:
"applicationTimeSec": {
"key-value": 10.0,
"key2-value2": 9.0
}MaxApplicationTimeSec
How long in real-time seconds it should take to apply the healing item even if armor is slowing application time.
Example:
"maxApplicationTimeSec": {
"key-value": 20.0,
"key2-value2": 15.0
}Ticks
Example:
"ticks": {
"key-value": 10,
"key2-value2": 15
}EffectDurationSec
How fast in real-time seconds should the healing effect apply all health points.
Example:
"effectDurationSec": {
"key-value": 10,
"key2-value2": 12
}CancelInAir
Control whether player should be able to heal with this item while falling/jumping.
Example:
"cancelInAir": {
"key-value": true,
"key2-value2": false
}CancelWhileSwimming
Control whether player should be able to heal with this item while swimming.
Example:
"cancelWhileSwimming": {
"key-value": true,
"key2-value2": false
}Sound
Sound produced when the healing item is being applied.
Example:
"sound": {
"key-value": "game:player/poultice",
"key2-value2": "game:player/bandage"
}AppliedSound
Sound produced after the healing item is applied.
Example:
"appliedSound": {
"key-value": "game:player/poultice-applied",
"key2-value2": "game:player/bandage-applied"
}SoundRange
Sound range in blocks when the healing item is being applied.
Example:
"soundRange": {
"key-value": 32,
"key2-value2": 48
}CanRevive
Determines whether this healing item can revive other players / tamed animals.
Example:
"canRevive": {
"key-value": true,
"key2-value2": false
}AffectedByArmor
Determines whether application speed of this healing item can be affected by armor.
Example:
"affectedByArmor": {
"key-value": true,
"key2-value2": false
}DelayToCancelSec
Not implemented.
Example:
"delayToCancelSec": {
"key-value": 0.5,
"key2-value2": 1
}