> ## Documentation Index
> Fetch the complete documentation index at: https://items.lodemc.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Item mechanics

> Backpacks, hammers, auto-smelting, harvesting, soulbound items and other special behaviour.

These options work on any item, and also on the items of [blocks](https://items.lodemc.net/blocks.md) and [props](https://items.lodemc.net/furniture.md).

## Backpacks

Right-click opens an inventory that is stored inside the item itself.

```yaml theme={null}
satchel:
  material: leather
  texture: satchel.png
  backpack: true            # 3 rows
```

```yaml theme={null}
explorer_pack:
  material: leather
  texture: explorer_pack.png
  backpack:
    rows: 4                 # 1 to 6
    title: "<gold>Explorer's Pack"
    open-sound: item.bundle.insert
    close-sound: item.bundle.remove_one
    blocked: [tnt, lodeitems:cursed_gem, "#minecraft:shulker_boxes"]
```

Backpacks stack to 1, can't go inside other backpacks, and an open backpack can't be moved or dropped. `blocked` takes item ids and `#tags`.

## Hammers

Mining with it also breaks the blocks around the one you mined, across the face you hit.

```yaml theme={null}
ruby_hammer:
  material: diamond_pickaxe
  texture: ruby_hammer.png
  hammer: 1       # 1 = 3x3, 2 = 5x5 (up to 4)
```

Sneak to mine a single block. Protection plugins are asked about every extra block.

## Auto-smelting

```yaml theme={null}
smelting_pick:
  material: iron_pickaxe
  auto-smelt: true    # iron ore drops iron ingots, sand drops glass...
```

Blocks mined with it drop what smelting their drops would give.

## Harvesting

Right-clicking a ripe crop harvests the ripe crops around it and replants them.

```yaml theme={null}
reaper:
  material: iron_hoe
  harvest: true         # the 3x3 around the clicked crop
```

```yaml theme={null}
great_reaper:
  material: netherite_hoe
  harvest:
    radius: 2           # blocks each way: 2 = 5x5 (up to 8)
    height: 1           # layers above and below (up to 4)
    replant: true       # takes one seed from the drops for each crop
    cooldown: 2s
```

## Durability

| Option | Does |
| - | - |
| `prevent-break: true` | Stops at 1 durability instead of breaking. |
| `disable-when-broken: true` | With `prevent-break`: at its last point of durability it stops working as a tool, weapon, shield or glider until it is repaired. |

## Death and drops

| Option | Value | Does |
| - | - | - |
| `keep-on-death` | `0` to `1` | Chance to stay in the inventory on death. `1` makes it **soulbound**. |
| `destroy-on-death` | `0` to `1` | Chance to vanish on death instead of dropping. |
| `drop-name` | `true` | Shows its name above it while it lies on the ground. |
| `drop-glow` | colour name | Makes it glow when dropped: `red`, `gold`, `aqua`... |
| `invulnerable` | `true` or a list | Dropped stacks survive `fire`, `explosion`, `cactus`, `lightning`, or `all` of them. |

```yaml theme={null}
heirloom_ring:
  material: gold_nugget
  texture: ring.png
  keep-on-death: 1
  drop-glow: gold
  invulnerable: [fire, explosion]
```

## Other options

| Option | Default | Does |
| - | - | - |
| `rename` | `true` | `false` stops players renaming it in an anvil. |
| `compost` | `0` | Chance (0 to 1) a composter accepts it as a layer. |
| `item-frame` | `true` | `false` stops it being put in item frames. |
| `vanilla-behaviour` | `false` | Whether it still acts as its base item. See [Items](https://items.lodemc.net/items.md#vanilla-behaviour). |
| `update` | `true` | Whether existing copies are updated when the config changes. See below. |

## Keeping items up to date

When you change an item's config, copies that players already have are rebuilt from the new config. This happens when a player joins (inventory and ender chest), opens a container, picks the item up, and for everyone online on `/lodeitems reload`.

What belongs to the player is kept: durability, a name they gave it, enchantments they added (the higher level wins when the config has the same one), dye, trims, contents, book pages, maps and potions. Data that other plugins put on the item is kept too. If your config now sets one of those itself, the config wins.

* Turn it off for one item with `update: false`.
* Turn it off everywhere with `items.update: false` in [config.yml](https://items.lodemc.net/configuration.md).

Items whose config you deleted are left alone.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.