Entities
On this page(10)
entity makes a fake mob or display that only the owner sees, for a while. Use it to drop a giant sword on a mob, float a text, orbit an axe or bounce a magma cube.
lightning is a fake lightning bolt.
Effect entities are visual only. Hitting one does nothing, and they damage nothing. To hit
with them, add a damage action timed with them (see Flow Control), or give a mob an
attack (see Fighters).
- type: entity
display: { item: sword, billboard: fixed } # a copy of YOUR sword
at: '{target_pos}'
offset: '0, 6, 0'
scale: 4
lifetime: 16
movement: { type: fall, speed: 0.35 }What it shows
Write exactly one of entity and display.
| Form | Shows |
|---|---|
entity: ZOMBIE | A living mob of the EntityType list. Not PLAYER or ENDER_DRAGON |
display: { item: DIAMOND_SWORD } | An item display of that material (not air) |
display: { item: sword } | A copy of your sword: its material, model and glint. The one in your hand, else the one of your tier |
display: { item: { material: ..., <look keys> } } | An item with its own look (the item map) |
display: { block: GOLD_BLOCK } | A block display |
display: { text: '&c-{damage_formatted}' } | A text display, with its variables |
A display also takes billboard: how it turns to face you.
billboard | Behaviour |
|---|---|
center (default) | Always faces you |
vertical | Turns around the vertical axis only |
horizontal | Turns around the horizontal axis only |
fixed | Never turns (needed for a clean rotation animation) |
Keys
| Key | Default | Range |
|---|---|---|
at | {target_pos} | Where it appears (positions) |
offset | '0, 0, 0' | Moves that point |
lifetime | 40 | Ticks, 1 to 600 |
movement | none | How it moves (below) |
glow | none | A glow color (below) |
scale | 1 | A mob 0.0625 to 16, a display 0.01 to 64 |
name | none | The visible name of a mob (mobs only) |
animation | none | Color, scale and rotation over time (below) |
equipment | none | What a mob wears and holds (below) |
attack | none | The mob fights your zone mobs. See Fighters |
model | none | A model instead of the vanilla look. See Models |
Movement
movement: { type: orbit, speed: 0.2, radius: 1.5 }type | What it does | Keys |
|---|---|---|
none (default) | Stays where it appeared | |
rise / fall | Moves speed blocks per tick up / down | speed (0.1, 0 to 4) |
orbit | Circles where it appeared | speed, radius (1.5, 0 to 16) |
to-target | Flies to the mob that procced and stays there | speed |
jump-to | Jumps in an arc to movement.to over its lifetime | to ({target_pos}), height (1, 0 to 64), offset (inside movement) |
to-targetaims atenchants.aim-heightof the mob's body (the middle, as shipped).jump-toarcsheightblocks over the higher end, and lands on its last move, right before it goes. The landing point is read once, when it appears.- An entity with
attackignores itsmovement(the fight moves it), with a warning.
Timing a fall. A display falls speed blocks per tick. From 8 blocks up at speed: 0.8 it
lands in 10 ticks. Give it a lifetime of 12 (two ticks past the landing) so its last move is
drawn, and hit with delay: 10 then damage.
Glow
glow takes a color name: black, dark_blue, dark_green, dark_aqua, dark_red,
dark_purple, gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow,
white. true is not a color. Glow shows on mobs and on item or block displays, never on text.
Animation
animation changes a display or a mob over time. It has three tracks, each a list of
{ value, ticks } steps, all starting when it appears. Values are plain (no expressions), ticks
0 to 100, at most 64 steps per track. A broken step is a warning and skipped.
animation:
loop: false
color: [ { value: '#FF5555', ticks: 5 }, { value: '#FFAA00', ticks: 5 }, { value: '#FFFF55', ticks: 5 } ]
scale: [ { value: 1, ticks: 0 }, { value: 4, ticks: 6 }, { value: 3, ticks: 4 } ]
rotation: [ { value: '0 0 0', ticks: 0 }, { value: '0 0 -120', ticks: 5 } ]| Track | Value | Behaviour |
|---|---|---|
color | '#RRGGBB' | Changes when its step starts and holds for its ticks. Recolors a text display (write the text without a color code), or the glow of an item display, block display or mob (they need glow:) |
scale | A number: 0.01 to 64 (a mob 0.0625 to 16) | Reached over the step's ticks, from the entity's scale |
rotation | 'yaw pitch roll' in degrees, -36000 to 36000 | Reached over the step's ticks, from '0 0 0'. '0 0 360' is a full turn |
- A step of 0 ticks jumps at once.
loop: truestarts every track again, from the start values, when the longest one ended. A loop whose steps all take 0 ticks plays once.- The
lifetimestill ends it. - On a display, use
billboard: fixedfor a clean rotation.
On a mob, rotation turns its body and head. Yaw and pitch are added to its facing. A mob appears facing south: 0 = south, 90 = west, 180 = north, -90 = east. Pitch goes from -90 (up) to 90 (down). Roll
is ignored with a warning. A rotation together with attack is ignored with a warning. A 0-tick
rotation gives a fixed facing: rotation: [ { value: '-45 0 0', ticks: 0 } ].
Equipment
equipment dresses an entity mob (and an npc). It is copy-player (your helmet,
chestplate, leggings, boots, your sword in the hand and your off hand) or a map of slots.
equipment:
helmet: { material: LEATHER_HELMET, color: '#FF0000', trim: { pattern: coast, material: gold } }
main-hand: sword
boots: { material: DIAMOND_BOOTS, glint: true }| Slot (any case) | Aliases |
|---|---|
head | helmet |
chest | chestplate |
legs | leggings |
feet | boots |
hand | main-hand, mainhand |
off-hand | offhand |
body | The armor of a horse, wolf or llama (Paper 1.20.5 and newer) |
saddle | A saddle (Paper 1.21.5 and newer). On an older server either slot is a warning and stays empty |
Each slot takes one value. It is a material (DIAMOND_HELMET, POPPY), sword (a copy of your sword, any slot) or an item map. It can also be copy-player: what you wear in that slot (nothing for body and saddle).
Item maps
| Key | What it does |
|---|---|
material | Required: a material, sword or copy-player |
amount | 1 to 99 (default 1) |
glint | true = the enchanted shine (default false) |
custom-model-data | A whole number |
item-model | A model key: minecraft:diamond or mypack:blade |
color | '#RRGGBB' or 'r,g,b': leather armor and dyed items |
texture | A head's base64 value (a PLAYER_HEAD) |
skull-owner | A player name or UUID (a PLAYER_HEAD) |
name | The item's name (colors) |
trim | { pattern, material }: an armor trim (coast, sentry... and gold, diamond...) |
The look keys apply to a material only: sword and copy-player show as you have them. A display's
item: takes the same item map, without copy-player. An unknown slot, a slot written twice, or a value that is not an item is a warning. That slot stays empty.
Models
model: on an entity mob, on an npc, or inside display: shows a model instead of the vanilla
look:
- { type: entity, entity: zombie, model: 'paper:1001', lifetime: 40 } # custom model data
- type: entity
display:
model:
item: { material: paper, custom-model-data: 1002, display-context: fixed }
scale: 1.5
lifetime: 40| Form | Shows |
|---|---|
'paper:1001' | An item with that custom model data |
'paper:my_pack:knight' | An item with that item model |
an item: block | material, custom-model-data, item-model, display-context, translation, rotation, billboard, glint |
'bm:<id>' | A BetterModel model (BetterModel installed) |
'meg:<id>' | A ModelEngine model (ModelEngine installed) |
The block form also takes scale, height, hitbox-scale, yaw-offset, render (default,
packet, entity) and animations (idle, walk, attack, hurt, death, spawn). A mob or
npc keeps its hitbox and its fight, and its equipment does not show on a model. A model display
plays its own animations (no animation: block). Without its engine, the vanilla look shows, with
one warning. Every key: Models.
lightning
A lightning bolt and its thunder, only you see and hear. It lives 20 ticks, counts as an effect entity and damages nothing.
- type: lightning
at: '{target_pos}'
offset: '0, 0, 0'Limits and lifetime
- Effect entities count against
enchants.max-entities(alive at once, 32 shipped) andenchants.max-entities-per-tick(8 shipped). One past either does not appear. - They disappear when their lifetime ends, when you change world, on
/dungeons reloadand when the module turns off. - A block display is drawn from the corner of its block: offset it by
-0.5on x and z to center it. A text display keeps the vanilla dark background. - An effect mob standing in front of a zone mob takes the click meant for it. Keep effect mobs short lived or out of the player's way.
- The player's
sword.enchant-entitiessetting hides them for that player. Their hits and rewards stay exactly the same.