Play Bettermodel Animation
Play an animation on a BetterModel entity
Campos
| Campo | Tipo | Predeterminado | Descripción | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
entity | Ref<BetterModelInstance> | — | The BetterModel entity to play the animation on
|
| Campo | Tipo | Predeterminado | Descripción | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
definition | Ref<BetterModelDefinition> | — | —
|
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
displayName | Var<String> | — | — |
sound | Var<Sound> | EMPTY | — |
data | List<Ref<EntityData<*>>> | empty | — |
modelId | Var<String> | — | The BetterModel model ID to use |
named | Var<Boolean> | false | Whether the entity should display a nametag |
defaultAnimationSettings | DefaultAnimationSettings | — | Default animation settings for the entity |
focusOffset | Vector | — | Offset used as focus point for interaction bounds like look_at |
headLight | Var<Int> | 0 | Light level of a fake light block above the entity's head (0 disables) |
hitboxes | List<BoneHitbox> | empty | List of custom hitboxes attached to bones |
nameOffset | Double | 2.3 | Y offset for the name display above the entity. Use this to adjust the text display height. |
showDisplayName | Boolean | true | Whether to show the display name above the entity |
spawnLocationVar<Position>ORIGINdataList<Ref<EntityData<*>>>emptyactivityRef<out SharedEntityActivityEntry>animationVar<String>idleanimationSettingsAnimationSettingsAnimationSettings (4)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
lerpIn | Duration | 250 | The duration of the lerp in effect |
lerpOut | Duration | 250 | The duration of the lerp out effect |
speed | Double | 1.0 | The speed of the animation |
force | Boolean | false | Force the animation to play, stopping others |
Campos comunes de TypeWriter (criteria, modifiers, triggers)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
criteria | List<Criteria> | empty | — |
modifiers | List<Modifier> | empty | — |
triggers | List<Ref<TriggerableEntry>> | empty | — |
How to use it
entity must be a BetterModel Instance that is currently displayed. animation is the exact Blockbench animation name. animationSettings sets lerpIn and lerpOut (blend durations, 250 ms by default), speed, and force, which stops other animations to play this one. Nothing happens if the entity is not visible or the animation name is empty.