Skip to content

Backpack and Pickup

liuye edited this page Nov 8, 2026 · 3 revisions

Block Backpack and Item Pickup

简体中文 | English

← Back to the index

This page covers two things: why a mob has blocks to place at all (the virtual block backpack), and how it collects things from the ground (pickup). How a placement picks its landing spot and actually puts a block down is described in Placement; whether a mob spawns with equipment at all is described in Equip and Messages.


1. What the backpack is

The block backpack is virtual: it is not a chest, it has no GUI and no inventory slots. It is simply a "entries + counts" list carried by each mob, and it exists purely to feed the placement behaviour.

Property Detail
No GUI Players have no way to open or browse it
No death drop When the mob dies, blocks in the backpack are not dropped and never turn into item entities
Not persisted Unloading and reloading the mob rolls again; everything it collected is gone
Visible in the off hand A mob with a backpack holds its current block in the off hand, amount = that entry's stock; the main hand stays free for a pickaxe
Existing off-hand item kept If the mob already holds something in the off hand it is not overwritten, and the swapped-out item has a drop chance of 0
Inspectable /mobinteract inspect lists every backpack entry and its amount

Key point: the backpack's only job is being spent on path building. It plays no part in combat and does not affect mining speed — mining only looks at whether the main hand holds a pickaxe (see Mining).


2. When a mob gets a backpack

There is only one path: pass the spawn gate first, then roll the backpack chance. A mob that failed the gate never gets blocks, and nothing hands them out later.

2.1 The spawn gate (main path)

When a mob enters the world, chance in equip.yml (default 0.10) is rolled once. Only after passing does it roll for the two finer-grained items:

passes the gate (chance in equip.yml, default 0.10)
├── pickaxe roll: mining.yml tool.give.chance (default 0.80)
└── backpack roll: placement.yml backpack.chance (default 0.65)

So the share of mobs that spawn with both a pickaxe and blocks is the two probabilities multiplied — with the defaults that is 0.10 × 0.65, only about 6.5%, far below 65%. To get more mobs that build paths, raise chance in equip.yml first; tuning backpack.chance alone buys very little.

2.2 The gate result is final

The gate is rolled once and never revisited: a mob that failed it will not re-roll for a backpack the first time it needs to place a block — or ever. The share of mobs "carrying blocks" therefore always stays within chance in equip.yml. Pickaxes behave the same way.

This is exactly why pickup.only-equipped (on by default) exists: without it, an empty-handed mob only has to walk past blocks on the ground to build itself a backpack, and the gate would be circumvented.

To make mobs in your world more likely to build paths, the only knob that matters is chance in equip.yml (plus the per-world overrides); backpack.chance merely filters again inside the gate.

2.3 Mobs that already exist

The gate result is never recomputed. To equip mobs already in the world you have two options: let them respawn, or hand the equipment over manually. Changing the config and running /mobinteract reload only affects mobs spawned afterwards.


3. The three numbers: chance, kinds, total

Config Default Meaning
backpack.chance 0.65 Chance of having a backpack (multiplied on top of the gate)
backpack.kinds.min / .max 1 / 4 How many kinds of block the backpack holds, inclusive
backpack.total.min / .max 6 / 20 How many blocks in total, inclusive

Rules that are easy to trip over:

  • Both ranges are inclusive: the min and the max themselves can be rolled.
  • When max < min the plugin does not error out — it swaps the two and logs a warning once. If you see that warning, fix the config.
  • Kinds and total are rolled independently: you can get 4 kinds holding 20 blocks, or 1 kind holding 6. When the total cannot cover the number of kinds, the kind list is truncated (next section).
  • The default ceiling of 20 blocks, combined with placement.max-per-chase (default 32), means a mob usually cannot empty its backpack in a single chase — there is normally stock left over.

4. How the backpack is filled

Generation always follows the same four steps; understanding them lets you predict what a backpack looks like:

  1. Roll the number of kinds from kinds.min..kinds.max.
  2. Sample by weight without replacement from the entries list, using each entry's own weight; a drawn entry is not put back, so the same id never appears twice in one backpack.
  3. Roll the total amount from total.min..total.max.
  4. Distribute the total across the chosen kinds: every kind gets at least 1; if the total is smaller than the number of kinds, the kind list is truncated — surplus kinds are discarded so that the "at least one each" invariant always holds.

Example (illustrative, not a default): 3 kinds and a total of 6 → each kind takes 1 first, then the remaining 3 are spread across them. If that same roll produced a total of 2 with 3 kinds, only 2 kinds would survive, holding 1 each.

"Without replacement" applies to kinds only. Which specific block is spent on each placement is re-drawn by each entry's original weight, so high-weight entries keep coming up — weight expresses the tendency to be drawn, not a proportion of the stock.


5. entries: what can be placed

entries is a top-level list in placement.yml (not nested under backpack:). Every entry needs a unique id, a type and a weight.

type Extra fields Behaviour
block material, optional block-data Places an ordinary block
tnt fuse-ticks Spawns an already primed TNT entity directly instead of occupying a block first
fluid fluid: WATER / LAVA, consume-bucket Pours a fluid; consume-bucket decides whether a bucket is deducted

The default entries are 6 ordinary blocks + TNT + a lava bucket + a water bucket — all low-value natural blocks, and deliberately no gravity-affected blocks such as sand or gravel. A backpack containing blocks that collapse would build bridges that fall apart on their own.

Two details that matter for the backpack:

  • If an entry is drawn but its stock is 0, that entry cannot place anything and the behaviour skips it.
  • TNT and buckets are functional blocks: with placement.special-only-under-target: true (the default) they are placed only in the block the target occupies and take no part in path building. They are therefore almost invisible in practice — do not count on them to pillar up.
  • For tnt, fuse-ticks is 60 in the bundled placement.yml. The internal fallback of 80 is used only when the key is deleted; while the key is present, the file wins.

6. One block spent per placement

  • Every successfully placed block costs one block. Stairs, pillaring, bridging and dropping down one block all count as one.
  • The drawn block is deducted from the stock as soon as the placement action starts (it is reserved). A failed placement, an occupied landing spot or a failed turn all return the block — so a mob that fails repeatedly never silently eats your stock.
  • Only actions that actually place a block consume stock. Merely walking somewhere (stepping aside, getting out of water, walking up an existing step) costs nothing.
  • When the stock runs dry the placement behaviour simply stops; no extra configuration needed. The real cap on a single chase is placement.max-per-chase (default 32) plus how far the chase gets — see Placement.
  • Blocks gathered through pickup go into the same backpack and share stock with the entries rolled at spawn.

7. Pickup: triggers and radii

Pickup makes mobs actively walk to items on the ground. There are two master switches, and either one being off disables it:

Key Default Notes
placement.enabled true Master switch for placement, which also controls pickup
pickup.enabled true Pickup's own switch; when off, vanilla pickup stays untouched

Timing and distance:

Key Default Notes
pickup.radius 8.0 Search radius: radius blocks horizontally, max(2, radius × 0.5) blocks vertically
pickup.reach 1.8 Distance at which the item is actually picked up; must be smaller than radius
  • Every taken-over mob that passes the world / mob filters checks once per second, picks the nearest "worth picking up" drop, paths towards it, and only removes the item entity once inside reach.
  • reach must be strictly smaller than radius. Get it backwards (for example radius: 1.0 with reach: 1.8) and nothing errors — the plugin lowers reach to radius / 2 and warns. To make mobs "spot it from far away and charge", raise radius and leave reach at its default.
  • The vertical search range is max(2, radius × 0.5): with the default radius: 8.0 that is about 4 blocks, so mobs can grab items in a pit below their feet but not items a dozen blocks overhead.

8. What is picked up, and what is not

Category Picked up? Destination
Blocks listed in entries ✅ Into the block backpack (pickup.blocks)
Pickaxes ✅ Into the main hand when it is empty (pickup.pickaxes)
Other placeable blocks (diamond block, netherite block, ...) ❌ Left on the ground
Gravity-affected blocks (sand, gravel, ...) ❌ Left on the ground
Hard-blacklisted blocks (bedrock, monster spawners, ...) ❌ Left on the ground
Non-block items (weapons, food, armour, ...) ❌ Left on the ground

Additional rules:

  • Gravity blocks are never picked up: they collapse when placed, so picking them up only pollutes the backpack and builds paths that fall apart.
  • Only what the backpack can use: a block is picked up only when its material already appears in entries (a block entry). Everything else is left on the ground. The reason is the 15-second cleanup: anything a mob stores is destroyed when it expires, so picking up a player's diamond block would silently delete it. If you want mobs to collect a material, add an entry for it first.
  • Pickaxes go to the main hand, or back on the ground: a pickaxe cannot be picked up while the main hand is occupied — it is dropped back on the ground, never swallowed out of thin air. Free the main hand first if you want mobs to collect pickaxes.
  • Picked-up pickaxes follow vanilla drop rules: players get them back by killing the mob, and tool.give.drop-chance (default 0.0 for plugin-granted pickaxes) does not apply.
  • Does pickup interrupt work? A mob that is mining or placing (busy) is not interrupted; it finishes what it is doing first.
  • Vanilla's casual pickup is rewritten: when vanilla tries to stuff a drop straight into the mob's hands, the plugin turns that into "blocks into the backpack, pickaxes into the main hand", so the stock and the off-hand display never diverge.

9. pickup.only-equipped

Key Meaning
pickup.only-equipped Only mobs that passed the spawn-equipment gate pick things up

This switch is the safety net for runaway equipment rates. The spawn gate is meant to keep the combined share of mobs with "pickaxe + blocks" under chance in equip.yml (default 0.10). But pickup is an after-the-fact supply route: an empty-handed mob only has to walk past blocks on the ground to build itself a backpack, which makes the gate moot.

With pickup.only-equipped enabled, the right to pick things up is gated as well: a mob that failed the gate will not reach for a drop even when standing on it. That is what actually keeps the "pickaxe + blocks" share within the number configured in equip.yml.

The manual's key table for placement.yml does not list a default for this entry. Trust the placement.yml your server actually generated; if the key is absent from that file, your build predates the switch.


10. The backpack is not persisted

This is the one most often mistaken for a bug:

  • A chunk unloading does not re-roll anything: leaving render distance and coming back keeps the same profile, so a mob cannot farm itself a fresh backpack by walking out of view. Since 1.4.0 the profile survives unloading and mob transformations.
  • A server restart does re-roll (profiles live in memory only), and so does /mobinteract reload.
  • Blocks gathered by pickup vanish with the entity; they are not dropped back on the ground.
  • So "I watched it pick up a pile of cobblestone and now it's gone" is expected behaviour, not data loss.

What this means for server owners: gameplay that relies on mobs slowly stockpiling blocks for long bridges is unreliable — long-distance building such as placement.bridge-max-length (default 24) often sees the stock reset halfway through. For stable long builds, raise backpack.total.max and placement.max-per-chase rather than hoping the mob accumulates over time. Related: blocks in the backpack are not dropped on death either, so a mob farm gains nothing from backpacks.


11. Copy-paste configuration

Everything below is a default value. Paste the whole block into placement.yml as-is; key placement and indentation match the generated file:

# placement.yml
backpack:
  # Chance of having a backpack (multiplied on top of the spawn gate)
  chance: 0.65
  # Total blocks in the backpack (inclusive range)
  total:
    min: 6
    max: 20
  # Number of block kinds (inclusive range)
  kinds:
    min: 1
    max: 4

pickup:
  # Pickup master switch; placement.enabled controls pickup as well
  enabled: true
  # Search radius: radius horizontally, max(2, radius * 0.5) vertically
  radius: 8.0
  # Distance at which an item is actually picked up; must be smaller than radius
  reach: 1.8
  # Blocks go into the backpack
  blocks: true
  # Pickaxes go into the main hand
  pickaxes: true

entries does not live under backpack: — it is a top-level list in placement.yml. Keep the defaults (6 ordinary blocks + TNT + lava bucket + water bucket); if you do restructure entries, each one still needs a unique id, type and weight.

A common direction for "make mobs build more" (run /mobinteract reload afterwards):

backpack:
  chance: 0.65      # don't rush this to 1.0
  total:
    min: 12         # raise the floor to avoid "out of blocks after two steps"
    max: 32
  kinds:
    min: 1
    max: 4

Raising backpack.chance alone is capped by chance in equip.yml. To make mobs across an entire world build more, start with Equip and Messages.


12. Troubleshooting checklist

Symptom Check first
Mobs never pick anything up Whether placement.enabled and pickup.enabled are both true; whether the world / mob filters exclude the mob; whether pickup.only-equipped is on and the mob failed the gate
Mobs pick up blocks but never place Whether the backpack is really non-empty (/mobinteract inspect); whether placement.max-per-chase is used up; whether it is in placement cooldown; whether it has a chase target
The main hand is always occupied, so pickaxes are ignored A pickaxe is dropped back on the ground while the main hand is full; clear the main hand, or stop other items from occupying it
Sand and gravel sit at the mob's feet, untouched Expected: gravity blocks are never picked up
The kinds in a mob's backpack look odd The weight of entries drives the draw; high-weight entries show up often
Picked-up blocks "disappear after a while" Unload and reload re-rolls the backpack — see Section 10
Many mobs charge the same drop pile Pickup assigns drops one at a time by nearest "worth picking up" item; there is no global queue, so this is normal under dense spawning

For live numbers, /mobinteract status prints a summary of the world / mob filters, placement limits and pickup configuration, while /mobinteract inspect shows a mob near your crosshair together with its backpack entries, its main-hand pickaxe, placements made in the current chase and its most recent behaviour. See Commands for the commands and permissions; wording lives in message.yml.


Related pages

  • Placement — how blocks in the backpack become stairs, pillars and bridges
  • Equip and Messages — chance in equip.yml and the combined "pickaxe + blocks" share
  • Mining — pickaxe materials and speed, and why no path building happens while mining
  • Commands — /mobinteract status|inspect|reload
  • FAQ — general troubleshooting for "the mob does nothing" and "the config has no effect"

Clone this wiki locally