Skip to content

Placement

liuye edited this page Nov 7, 2026 · 2 revisions

Building Paths (Placement)

简体中文 | English

← Back to the index

A mob chases you to the edge of a ravine, then pulls a cobblestone out of nowhere and puts it under its feet — that is the placement behaviour. Taken-over zombies, skeletons, illagers, piglins and witches build their own path out of a virtual block backpack: they lay stairs, pillar up, or bridge a gap.

This page covers four things: when a mob starts placing, how each of the three builds is decided, why it usually places nothing at all, and every placement.* key plus how to write entries.

At a glance

Situation What it does Blocks used
The target is ahead, only 1 block higher, or the ground ahead is already solid Walks up directly None
The target is ahead and above, horizontally ≥ 4 blocks away, height difference 2 or more but under 8 Builds stairs: one level forward and one level up at a time 1 per step
The target is much higher (≥ 8 blocks), or straight above Pillars up in place: finds a clear column first, then stacks 1 per block
The target is across a gap, or it must first rise to the same height Pillars up to the target's height, then bridges sideways 1 per block
The target is clearly lower and a deep gap lies ahead Builds one block down — exactly a one-block drop 1
A flat chase, only a block or two of difference Places nothing, leaves it to vanilla pathfinding —

When placement happens

Four prerequisites must hold at the same time:

  1. A chase target exists. By default only the current AI target counts; with placement.vertical-aggro: true (the default), if a visible survival / adventure player is within 16 blocks above and the mob has not aggroed yet, it locks on actively — the pillar logic depends on this.
  2. The backpack is not empty. Either the mob rolled a backpack at spawn (backpack.chance, default 0.65), or it accumulated blocks through pickup (see Backpack and Pickup).
  3. This chase has not used up placement.max-per-chase (default 32), and it is not in a placement cooldown.
  4. The drawn entry can actually build a path. If the entry is TNT, a water bucket or a lava bucket, with placement.special-only-under-target: true (the default) it is placed only in the block the target occupies and takes no part in path building — a mob whose backpack holds only functional entries will not lay a bridge to travel.

What actually triggers placement is one of two things: a height difference it cannot climb, or a gap / drop it cannot cross.

Conversely, it stays put in these cases:

Situation Reason
The target is close and at most 2 blocks higher Vanilla melee / jumping already handles it
The drop ahead is ≤ 3 blocks Vanilla handles a 3-block drop by itself; walking down is faster
The block ahead, or the block under the feet ahead, is a liquid Liquids are always avoided — no bridge, no stairs
It is currently mining Mining and placement are mutually exclusive; no new path starts while mining
The world / mob is filtered out, or enabled: false The whole behaviour is off

Decide first, then place: strategy order

Every decision walks this order and stops at the first level that works:

melee → get out of the water → ascend (stairs / pillar) → bridge / descend

Condition Action
Horizontal distance < 1 block and the target at most 2 blocks higher No placement, leave it to vanilla melee
The mob is in water (its foot block or the block below is a liquid) Walk to a dry foothold nearby (consumes no blocks); if the target is in water too, swim straight across
Height difference ≥ 2 blocks, horizontal ≥ stair-min-distance (4.0), height difference < pillar-far-height (8) Build stairs
Height difference ≥ pillar-far-height (8), or horizontal ≤ pillar-near-distance (2.0) Pillar up in place
Anything else (target across a gap, or the mob must first rise to its height) Pillar up to the target's height, then bridge sideways
The target is clearly lower (vertical-drop, default 1.5) and a deep gap lies ahead Build one block down

Two boundaries worth spelling out: anything only 1 block higher is left to vanilla jumping (no stairs, no pillar), and targets beyond placement.bridge-max-length (default 24) get neither a bridge nor stairs — so chasing one distant mob never paves a sky bridge.

The three builds, block by block

Action Where the block goes What happens next
Stairs The block at foot height in front (only along the dominant axis) Moves onto the block above it, jumping up one level while advancing one block
Pillar up The block under its own feet Rises one block first, then places; no facing check
Bridge The block under the feet ahead (one lower when descending) Moves onto the block it just laid
Walk The chosen pillar column / an already-laid block Issues a path order only, places nothing

Details:

  • Horizontal movement always follows the dominant axis (the axis with the larger horizontal delta), so the result is one staircase, one pillar or one L-shaped bridge — never a scattering of little steps.
  • Once a pillar column is chosen it is remembered on the mob, so the landing spot does not change every few ticks; a column it cannot reach or place into is recorded as "do not retry during this chase" and another is picked. The search range comes from placement.lane-search-radius (default 3, 0 = only the block under itself).
  • Why pillar-up skips the facing check: looking down at its feet locks the mob into repeated failed turns, so that step deliberately omits it.
  • The entry is deducted from the backpack the moment the action starts (reserved) and refunded if placement fails, the position is occupied, or the turn fails — so the number of placements never exceeds the stock.
  • Path building is fast: stairs / pillar / bridge deck wait only about 0.2 s between blocks; only functional blocks (TNT / buckets) use placement.cooldown-seconds (default 3.0).
  • A mob with a backpack keeps its current block in the off hand (amount = stock, the main hand stays reserved for the pickaxe); an existing off-hand item is never overwritten, and items held there have a drop chance of 0.
  • If the placement position is taken by a companion, or the mob is pushed out of the one-block range, it re-plans (at most 4 times) instead of failing straight into a cooldown.

Why it does not place recklessly

This table is the answer to "why won't it just pave the way for itself":

Situation Result
A ready-made step is already ahead (only 1 block higher), or the ground under the feet ahead is solid Walks up directly, no block placed
The drop ahead is ≤ 3 blocks Walks down directly, no path laid
The block ahead / the block under the feet ahead is a liquid No stairs, no bridge
The wall ahead is two or more blocks high Does not force it; leaves it to vanilla detouring or mining
Any creature (including the chase target) occupies the landing block No placement; but "the target standing in the block ahead" does not count as blocking (the target is excluded from the occupancy check)
The block above (the second block above the feet) is capped, and mining it would let the pillar continue A mob with a pickaxe hands over to mining to dig through first; no pickaxe / cannot mine → picks another column
Squeezed by companions (placement.spread-crowd) Steps aside and spreads out first, no placement this time

The two easiest to trip over: no paving on flat ground (a drop of ≤ 3 blocks is simply walked down; only deeper gaps get a bridge), and waiting when someone is in the way — when the landing block is occupied it would rather stand and wait than drop a block on a companion's head.

placement.max-per-chase is also a hard cap: stairs, pillar and bridge are all "one block per placement", so once 32 placements are used in one chase it stops and waits for the next chase. A bridge that stops halfway across is usually this value being too small (the pre-1.2.0 default of 10 hit this far more often).

placement.* reference

Distance, facing and pacing

Key Default Notes
placement.max-distance 4.0 Maximum distance from the mob to the placement position; with require-adjacent: true adjacency decides, this is only a cap
placement.require-adjacent true The position must be adjacent: horizontal ±1, vertical −2..+1 (−2 exists for building one block down); false falls back to max-distance
placement.max-facing-angle 60 Maximum facing angle before placing (degrees). Beyond it the mob turns and retries; if it still cannot turn, that placement is cancelled (the entry is refunded)
placement.max-per-chase 32 Maximum placements in a single chase (0..512). Reset when the target changes or is lost
placement.cooldown-seconds 3.0 Functional-block cooldown (path building waits only about 0.2 s)
placement.build-delay-ticks 6 "Short build progress" delay in ticks between picking an entry and actually placing it
placement.retry-seconds 1.5 Retry cooldown after a rejected / failed placement
placement.vertical-drop 1.5 Height difference that counts as "the target is clearly lower", triggering the one-block-down build

Switches and thresholds for the three builds

Key Default Notes
placement.stair-up true Whether stairs are allowed
placement.stair-min-distance 4.0 Horizontal ≥ this value prefers stairs
placement.pillar-up true Whether pillaring up is allowed; when off, a high target can only be reached by stairs or a bridge
placement.pillar-up-max-height 16 Maximum pillar height in a single chase (0 = unlimited, keeps it from pillaring into the sky)
placement.pillar-far-height 8 Height difference ≥ this value always switches to pillaring, never stairs
placement.pillar-near-distance 2.0 Horizontal ≤ this value always pillars in place; lowered automatically with a warning when not smaller than stair-min-distance
placement.bridge true Whether horizontal bridging is allowed
placement.bridge-max-length 24 Beyond this distance from the target, no bridge / stairs are built

Behaviour details and lifetime

Key Default Notes
placement.lane-search-radius 3 Horizontal radius for finding a pillar column (0 = only the block under itself)
placement.smart-ascend true Scouts vanilla pathfinding / nearby steps first and builds only when necessary
placement.spread-crowd true Gives way when crowded, so several mobs never stack on one block and block each other
placement.spacing-radius 1.0 Centre distance that counts as "crowded together"
placement.special-only-under-target true Functional blocks go only into the target's block and are not used for path building; when off they build like ordinary blocks
placement.vertical-aggro true Actively locks onto a visible player within 16 blocks above when the target is above but not aggroed
placement.block-lifetime-seconds 15 Lifetime of placed blocks (0 = permanent, maximum 86400)

A few file-level keys also apply: config-version (currently 2, used only for migrating older files), enabled (true, master switch, also controls pickup), worlds.whitelist / worlds.blacklist (empty whitelist = all worlds, blacklist wins), mob-whitelist / mob-blacklist (empty = the default humanoid set, ["*"] = every mob).

entries: what the backpack can hold

Every entry needs a unique id, one type and one weight. weight is the relative weight for being drawn / chosen — higher means more common.

type Required fields Behaviour
block material (plus optional block-data) Places an ordinary block — the workhorse of path building
tnt fuse-ticks Spawns an already-primed TNT entity directly, without placing a TNT block first; the fuse is in ticks, 20 ticks = 1 second
fluid fluid: WATER or LAVA, plus consume-bucket Pours a fluid; consume-bucket: true means the bucket is consumed with the placement, false means the bucket is recovered and can pour again

The default entries (6 ordinary blocks + TNT + lava bucket + water bucket):

id type weight Key fields
cobblestone block 30 material: COBBLESTONE
dirt block 22 material: DIRT
stone block 18 material: STONE
andesite block 14 material: ANDESITE
oak_planks block 8 material: OAK_PLANKS
netherrack block 6 material: NETHERRACK
tnt tnt 3 fuse-ticks: 60 (3 seconds)
lava_bucket fluid 2 fluid: LAVA, consume-bucket: true
water_bucket fluid 4 fluid: WATER, consume-bucket: true

Things to keep in mind:

  • The default entries contain only low-value natural blocks — no high-value blocks such as diamond or netherite blocks, and no gravity-affected blocks such as sand or gravel (the latter collapse when placed, so the bridge or pillar will not stand). Add your own entries if you like, but never gravity blocks.
  • How many blocks and how many kinds a backpack holds is governed by backpack.* and is not covered here — see Backpack and Pickup.
  • Where functional blocks land is decided by placement.special-only-under-target, which by default means only the target's block.

Lifetime, renewal and cleanup

Item Behaviour
Default lifetime placement.block-lifetime-seconds: 15 (0 = permanent, source tagging only)
Sweeping A global sweeper scans the expiry table every 20 ticks
Batching Expired blocks are merged into one region task per chunk, deleting a batch at a time
Pre-delete validation The block type is compared again; blocks a player replaced in the meantime are only dropped from the registry, never deleted by mistake
Chunk not loaded That entry is retried after 5 seconds and is not lost
Creature above If a living creature (including a mob crossing the bridge) is within 1.2 blocks above the block when it expires → renewed for a full cycle
Unload / shutdown Every registered block (including permanent ones) is removed: pending-blocks.txt is written to disk first, then "delete directly + dispatch a region task on failure", and the next start cleans up as a fallback
Capacity The registry holds at most 50,000 entries; beyond that the oldest records are evicted in insertion order
  • 15 seconds assumes "a 20-block bridge takes about 10 seconds to lay" — just enough for the mob to reach the far side. Longer bridges and taller pillars need a larger value, otherwise the blocks behind start vanishing while the mob is still walking.
  • Standing on a block renews it, so the bridge never disappears from under its feet. The trade-off is that a block the mob stands on indefinitely stays indefinitely.
  • Replaced blocks are only dropped from the registry, never deleted: if a player puts a different block where a mob placed one, the sweeper sees the type mismatch and only clears the record.
  • TNT and fluids are registered and cleaned up by exactly the same rules (TNT disappears on its own once it explodes).
  • The registry is in memory: a normal shutdown removes everything and leaves the list behind, while a hard kill during runtime (no unload path) leaves no list at all, and those blocks have to be cleaned up by hand.

A placement.yml you can copy

This is the complete slice relevant to path building (backpack.* and pickup.* are on Backpack and Pickup):

config-version: 2
enabled: true                 # master switch, also controls pickup

worlds:                       # empty whitelist = all worlds; blacklist wins
  whitelist: []
  blacklist: []
mob-whitelist: []             # empty = default humanoid set; ["*"] = every mob
mob-blacklist: []

entries:                      # ids must be unique, weight is relative
  - id: cobblestone
    type: block
    weight: 30
    material: COBBLESTONE
  - id: dirt
    type: block
    weight: 22
    material: DIRT
  - id: stone
    type: block
    weight: 18
    material: STONE
  - id: andesite
    type: block
    weight: 14
    material: ANDESITE
  - id: oak_planks
    type: block
    weight: 8
    material: OAK_PLANKS
  - id: netherrack
    type: block
    weight: 6
    material: NETHERRACK
  - id: tnt
    type: tnt
    weight: 3
    fuse-ticks: 60            # 20 ticks = 1 second, 60 = 3 seconds
  - id: lava_bucket
    type: fluid
    weight: 2
    fluid: LAVA
    consume-bucket: true      # true = consumed with the pour; false = reusable
  - id: water_bucket
    type: fluid
    weight: 4
    fluid: WATER
    consume-bucket: true

placement:
  max-distance: 4.0           # placement distance cap
  require-adjacent: true      # horizontal ±1, vertical −2..+1 (−2 for stepping down)
  max-facing-angle: 60        # maximum facing angle before placing (degrees)

  max-per-chase: 32           # maximum placements per chase (0..512)
  cooldown-seconds: 3.0       # functional blocks only
  build-delay-ticks: 6
  retry-seconds: 1.5

  vertical-drop: 1.5          # height difference for "the target is clearly lower"
  block-lifetime-seconds: 15  # 0 = permanent, maximum 86400

  stair-up: true              # stairs
  stair-min-distance: 4.0

  pillar-up: true             # pillar up
  pillar-up-max-height: 16    # 0 = unlimited
  pillar-far-height: 8
  pillar-near-distance: 2.0   # must stay below stair-min-distance

  bridge: true                # bridge
  bridge-max-length: 24

  lane-search-radius: 3       # 0 = only the block under itself
  smart-ascend: true
  spread-crowd: true
  spacing-radius: 1.0
  special-only-under-target: true
  vertical-aggro: true

Apply changes with /mobinteract reload — no restart needed (see Commands).

Upgrading from an older version

Item Notes
placement.block-lifetime-seconds Defaults to 15 since 1.2.0 (previously 60). The plugin never rewrites your file, so change it by hand
placement.max-per-chase Defaults to 32 since 1.2.0 (previously 10). If the file says config-version: 1 and the value is still 10, it runs as 32 and warns in the console; raising it by hand is recommended
config-version Currently 2; the migration only touches max-per-chase, every other value is taken from your file as-is

Troubleshooting: why nothing happens / why blocks never vanish

  • Use /mobinteract inspect on a mob within 16 blocks of your crosshair: cooldowns, placements used in this chase, main-hand pickaxe, most recent action, pillar height, backpack contents. The "most recent action" line names the reason directly, e.g. 放置次数已用完(max-per-chase=32) or 放置失败 cobblestone @x,y,z.
  • Common causes: no backpack or an empty stock; max-per-chase used up; the target is only 1 block higher (left to vanilla jumping); a liquid is in the way (always avoided); the landing block is occupied by another creature; the mob is mining (placement waits its turn); the world / mob is filtered out, or the master switch is off.
  • Blocks never vanish: check that block-lifetime-seconds is not 0; a creature within 1.2 blocks above the block renews it; an unloaded chunk retries after 5 seconds.
  • To make it build further: raise max-per-chase and block-lifetime-seconds together, and only then look at bridge-max-length and the bridge switch.

Related pages

Clone this wiki locally