> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edmortars/mortars/looks.md).

# Looks & Custom Models

`models.type` in a mortar file picks the look:

| Type                | What it is                                                                                            |
| ------------------- | ----------------------------------------------------------------------------------------------------- |
| `vanilla` (default) | Built from block and item displays. No resource pack, works on every client.                          |
| `modelengine`       | Your own ModelEngine models. Falls back to the vanilla look when ModelEngine or the model is missing. |

## The vanilla mortar

The default mortar sits on a wooden carriage with iron caps and trunnions. Its banded netherite barrel is tilted 42 degrees and has a dark bore. Beside it stand an ammo barrel with TNT and a post with a hanging chain and lantern. The locked state is the same mortar wrecked: a broken carriage, a fallen cheek, the barrel lying on the ground, a cobweb, vines and moss. When it fires, the barrel kicks back and glides home.

Every part is a block display, or an item display with `item:`, in the mortar's own space: `x` sideways, `y` up from the floor, `z` forward (the way the mortar faces, from the placeable's yaw).

```yaml
models:
  type: vanilla
  vanilla:
    scale: 1.0                    # the whole model; hitbox, hologram and muzzle follow it
    hitbox-width: 1.3
    hitbox-height: 1.7
    hologram-height: 1.9
    muzzle-offset: '0,1.42,0.52'  # where shells leave (x,y,z like the parts)
    recoil: 0.2                   # blocks the recoil parts kick back
    recoil-ticks: [ 2, 6 ]        # kick back, glide home
    unlocked:
      barrel:
        block: NETHERITE_BLOCK
        size: '0.42,0.42,1.2'     # or one number for a cube
        offset: '0,0.92,0.1'      # the part's centre
        rotation: '-50,0,0'       # pitch,yaw,roll around the centre (negative pitch tilts the front up)
        recoil: true
    locked:
      # ...
```

For an item display, replace `block:` with `item: <MATERIAL>` (and optionally `custom-model-data: <n>` for a resource-pack model). Flat items like `LANTERN`, `CHAIN` or `COBWEB` show as a sprite, block items as a cube; the item is centred on `offset`.

Any block works except blocks the client draws as entities (chests, signs, heads, banners, beds), which stay invisible in a block display. Add, remove or recolour parts freely; a state with no parts shows one block from the old `models.fallback` section (`locked-block` / `unlocked-block`).

## ModelEngine models

```yaml
models:
  type: modelengine
  locked:
    model: my_mortar_broken
    scale: 0.6
    idle-animation: ''        # looping animation, '' = none
  unlocked:
    model: my_mortar
    scale: 0.6
    idle-animation: ''
fire:
  animation: fire             # one-shot animation when it fires
  muzzle-offset: '0,2.3,1.1'  # right,up,forward at scale 1.0
hologram:
  offset: 3.2                 # height at scale 1.0
```

* The model needs a `hitbox` bone to be clickable.
* `scale` resizes the model and its hitbox; `fire.muzzle-offset` and `hologram.offset` are measured on the unscaled model and follow it.
* Put your `.bbmodel` files in `plugins/ModelEngine/blueprints/`, run `/meg reload` and send players ModelEngine's resource pack.
* The jar ships two ready models, `monster_mortar` and `monster_mortar_broken` (with `fire` and `idle` animations). Set `install-models: true` in config.yml and EdMortars copies them into `plugins/ModelEngine/blueprints/EdMortars/` and runs `/meg reload` (never over a copy you edited).

## Shells

`shell.type` is `block` (a block), `item` (any item, `custom-model-data` for a resource-pack model) or `model` (a ModelEngine model, `shell.model`). See [Shots & Rewards](/p/edmortars/mortars/shots-rewards.md).
