entity_displace¶
type: "entity_displace"
Displaces the target entity's model vertices themselves (rendered with the vanilla body material, so lighting/shadows stay normal) - the body tears/glitches, no ghost copy on top.
Fields¶
Entity effects are targeted with
/vfx playentityor theentity_selectorfield and also accept the shared definition fields (duration,easing,loop,persistent,fade_ticks,sound).
| Field | Type | Default | Meaning |
|---|---|---|---|
amplitude |
float | 0.1 (fades to 0) | Max displacement in blocks (0..2) |
scale |
float | 4 | Field detail: higher = neighbours diverge more (0.5..32) |
seed |
float | 0 | Random phase; step it (expr: "floor(t*8)*0.1") for 8x/s snaps, animate for smooth morphing |
Targets are set via /vfx playentity <effect> <selector>, via the Java API (see Java API) or via the entity_selector field in the definition (then /vfx play <effect> is enough - the server finds the targets itself). One effect can target up to 16 entities; several effects can hang on one entity. On the first-person hand the local player's own effects are rendered too (through_blocks is ignored there - the hand always draws on top).
Example¶
{
"type": "entity_displace",
"duration": 60,
"params": { "amplitude": 0.1, "scale": 4, "seed": 0 }
}
Code¶
Its datapack definition:
{
"type": "entity_displace",
"duration": 160,
"easing": "ease_in_out_cubic",
"persistent": true,
"loop": true,
"fade_ticks": 12,
"entity_selector": "@e[tag=vfx_showcase,limit=1]",
"params": {
"amplitude": {
"keyframes": [
{
"time": 0,
"value": 0.0
},
{
"time": 80,
"value": 0.12
},
{
"time": 160,
"value": 0.0
}
]
},
"scale": 4.0,
"seed": 0.0
}
}