Models
On this page(11)
A model: key replaces the vanilla look of an entity with a custom model. It can be an item from
your resource pack, or a BetterModel or ModelEngine model. The model is only a look. The entity keeps
its health, its hits, its rewards and every rule it had.
| Where | Zone mobs, zone NPCs, enchant entities (mobs, displays, NPCs, fighters) and the second hand |
| Global settings | models: of config.yml |
| Engines | BetterModel 2.2.0+, ModelEngine R4, floodgate (all optional) |
| Without a key | Nothing changes: the vanilla look |
How it works
Write a model: key on an entity. When the entity appears, each player sees the model instead of
its vanilla look. The fight, the name above it and the damage hologram all follow the model's
height.
- An engine that is not installed, or an unknown model id, shows the vanilla look with one console warning. An enchant display with such a model is skipped.
- The
equipmentof a mob or NPC with a model does not show, with one warning. - A model adds no setting of its own:
sword.enchant-entitiesstill hides the enchant entities and the second hand.
Where you write it
| Entity | Key | Page |
|---|---|---|
| A zone mob | stages.<n>.mob.model of modules/zones/zones/<zone>.yml | Zone Files and Stages |
| The zone NPC | npc.model of the zone file | Zone NPC and Mob Refresh |
| An enchant mob | model: of an entity action with entity: | Entities |
| An enchant display | display: { model: ... } of an entity action | Entities |
| An enchant NPC | model: of an npc action | Entities |
| The second hand | follow.model of a second-hand enchant | Second Hand |
The model forms
Short forms
| Form | What it shows |
|---|---|
'paper:1001' | An item with that custom model data |
'paper:my_pack:knight' | An item with that item model (a namespaced key, Minecraft 1.21.4+) |
'bm:<id>' | A BetterModel model (needs BetterModel) |
'meg:<id>' | A ModelEngine model (needs ModelEngine) |
mob:
type: ZOMBIE
health: 500
model: 'paper:1001'Block form
The block form takes exactly one kind (item, bettermodel or modelengine) and the shared keys
below.
model:
bettermodel: chicken_knight
scale: 1.0
animations:
idle: idle
hurt: hitmodel:
item:
material: paper
custom-model-data: 1002
display-context: fixed
scale: 1.5| Key | Default | What it does |
|---|---|---|
item | An item model, with the item keys below | |
bettermodel | A BetterModel model id | |
modelengine | A ModelEngine model id | |
scale | 1 | The size of the model, 0.0625 to 16 |
height | 0 | The model's height in blocks, up to 64. 0 = the entity type's height. Enchants aim at it and the name sits above it |
hitbox-scale | The size of a zone mob's hitbox. Without it, the hitbox follows height over the type's height | |
yaw-offset | 0 | Degrees added to the facing, -360 to 360, for a model made facing another way |
render | default | packet, entity or default (= models.render of config.yml) |
animations | the moment's name | The animation names of the model for idle, walk, attack, hurt, death and spawn. '' = none |
Item keys
| Key | Default | What it does |
|---|---|---|
item.material | The item material | |
item.custom-model-data | A whole number for a resource pack model | |
item.item-model | An item model key (my_pack:knight), Minecraft 1.21.4+ | |
item.display-context | head | How the item is drawn (head, fixed, gui, ground...) |
item.translation | An offset, 'x y z' | |
item.rotation | A turn, 'yaw pitch roll' | |
item.billboard | fixed | fixed, vertical, horizontal or center: whether it turns to face the viewer |
item.glint | false | true = the enchanted glint |
Animations
An engine model plays its animations at these moments. An item model plays none.
| Moment | When |
|---|---|
spawn | When the entity appears |
idle | In a loop, the rest of the time |
walk | While a zone mob is thrown by the NPC, a fighter walks, or a moving effect entity moves |
attack | On an NPC throw, a fighter hit and a second-hand dash |
hurt | On each hit, at most once per models.hurt-gap-ticks |
death | On a kill |
The enchant action play-animation plays any animation of the models of zone mobs. See
Entities.
Render modes
| Mode | How it works | Cost |
|---|---|---|
packet (default) | Fake entities only. An item model is an item display at the entity's feet. A BetterModel model rides an empty display, a ModelEngine model is a dummy shown to its viewer | The lightest |
entity | An item model is a fake armor stand wearing it. An engine model sits on a real, hidden marker armor stand shown only to its viewer | One real entity per viewer and model |
In the entity mode, the real armor stands are never saved and are removed with the view. Any left
over by a crash is removed at the next start. Past models.max-entity-carriers, or where the chunk
is not loaded, an engine model takes the packet form. models.render: entity prints one console
warning at startup.
Bedrock players. With Geyser and floodgate installed and models.bedrock-fallback: true, a
Bedrock player gets the form their client can draw. That is the armor stand for an item model, and
the entity form for an engine model, whatever the render says.
Configuration
The models: block of config.yml. Re-read on /dungeons reload.
models:
render: packet
interpolation-ticks: 3
view-range: 64
bedrock-fallback: true
max-entity-carriers: 200
max-engine-models: 2000
hurt-gap-ticks: 10| Key | Default | What it does |
|---|---|---|
models.render | packet | How a model with render: default is drawn: packet or entity |
models.interpolation-ticks | 3 | Ticks a packet model glides between two moves, 0 to 10 |
models.view-range | 64 | How far a packet model is seen, in blocks, 8 to 256 |
models.bedrock-fallback | true | Bedrock players (floodgate) get the form they can see |
models.max-entity-carriers | 200 | Most real armor stands the entity form keeps at once, 0 to 5000. Past it, the packet form |
models.max-engine-models | 2000 | Most BetterModel and ModelEngine models shown at once, 0 to 20000. Past it, the vanilla look |
models.hurt-gap-ticks | 10 | Fewest ticks between two hurt animations of one model, 0 to 100 |
Engines and server versions
| Engine | Needs | Notes |
|---|---|---|
| Item models | Nothing | item-model needs Minecraft 1.21.4+. Below it, the base material shows |
| BetterModel | BetterModel 2.2.0+ | Runs on Paper 1.21.x only. On another version the vanilla look shows |
| ModelEngine | ModelEngine R4 | Follows its own version support |
| floodgate | floodgate | Only for the Bedrock fallback |
On 1.20.4 there is no entity scale. An item model shown on an armor stand keeps its normal size,
and its scale: is ignored.
When BetterModel or ModelEngine reloads (/bettermodel reload, /meg reload), the zone mobs and
NPCs show the new models at once. The second hand follows within half a second.
Tips
- Start with an item model (
'paper:1001'): it needs no engine and is the cheapest to draw. - Set
heightfor a model much taller or shorter than its entity type. The name and the aim point then sit right. /dungeons admin inspect player <player>has amodelssection. It shows the engines found, the render, Bedrock, the counters against their caps and the live views of each module.- Keep
models.render: packetunless your Bedrock players need the entity form.