Size Changing
Size change types define how an entity's size transitions from one value to another. They control the duration, easing curve, size bounds, and optional trail effects played during the transition.
A size change type is referenced by its identifier (e.g. palladium:default) and can be used by commands, abilities, and actions.
Palladium includes one built-in type: palladium:default (20-tick in_cubic ease, bounds 0.0625 to 16).
Creating a Size Change Type
Size change types are defined as JSON files at:
{
"duration": 20,
"min_size": 0.0625,
"max_size": 16,
"easing": "in_cubic",
"trails": []
}
duration (optional, default: 20) is the number of ticks the size transition takes. Set to 0 for an instant change.
min_size (optional, default: 0.0625) is the smallest size multiplier this type permits. Any target value below this will be clamped up.
max_size (optional, default: 16) is the largest size multiplier this type permits. Any target value above this will be clamped down.
easing (optional, default: "linear") controls the shape of the transition curve. The following values are available:
| Value | Description |
|---|---|
linear | Constant speed throughout |
in_sine / out_sine / in_out_sine | Sine-based curve |
in_quad / out_quad / in_out_quad | Quadratic curve |
in_cubic / out_cubic / in_out_cubic | Cubic curve |
in_quart / out_quart / in_out_quart | Quartic curve |
in_quint / out_quint / in_out_quint | Quintic curve |
in_expo / out_expo / in_out_expo | Exponential curve |
in_circ / out_circ / in_out_circ | Circular curve |
in_back / out_back / in_out_back | Overshoot curve |
in_elastic / out_elastic / in_out_elastic | Elastic bounce at the end |
in_bounce / out_bounce / in_out_bounce | Bounce curve |
in_* eases start slow and accelerate. out_* eases start fast and decelerate. in_out_* combines both. How they look can be viewed at easings.net.
trails (optional) is a list of trail identifiers that play on the entity while the transition is in progress.
"trails": ["mypack:shrink_effect", "mypack:size_particles"]
Via Command
/palladium size set <entities> <size> [type] and /palladium size change <entities> <size> [type] both apply a size modifier to the target entities, transitioning to the given value using the specified type. If [type] is omitted, palladium:default is used.
/palladium size reset <entities> instantly clears all active size modifiers and restores the entity to its base size with no transition.
/palladium size reset <entities> <type> removes only the modifier for the given type, smoothly transitioning back to 1.0 using that type's duration and easing.
/palladium size query <entity> reports the entity's current combined size multiplier.
/palladium size query <entity> <type> reports the current value of the specified modifier alone.
Via Ability
The palladium:size ability applies a size modifier while the ability is enabled and automatically reverts it when the ability is disabled. See the Abilities page for how to set up abilities in general.
"shrink": {
"type": "palladium:size",
"size": 0.5,
"size_change_type": "palladium:default"
}
size is the target size multiplier.
size_change_type is the identifier of the size change type defining the transition.
Via Action
Two actions are available for use in action-based flows. See the Actions page for how to set up actions in general.
palladium:change_size applies a size modifier, transitioning to the target value using the type's duration and easing. The modifier persists until explicitly removed.
{
"type": "palladium:change_size",
"size_change_type": "palladium:default",
"size": 2.0
}
palladium:set_size instantly sets the entity's size and clears all active size modifiers. The type's min_size and max_size are still used to clamp the value, but there is no transition.
{
"type": "palladium:set_size",
"size_change_type": "palladium:default",
"size": 2.0
}