> For the complete documentation index, see [llms.txt](https://nexoaddon.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nexoaddon.gitbook.io/docs/mechanics/repair.md).

# Repair

The Repair Mechanic allows players to repair damaged items in their inventory using a specific repair item. The repair process consumes the repair item while restoring a portion of the durability of the damaged item. The amount of durability restored is determined by the repair ratio defined in the mechanic configuration.

<figure><img src="/files/MH94LyHDod7V3v5XAUQ0" alt="" width="640"><figcaption></figcaption></figure>

{% hint style="warning" %}
There is duplication bug using <mark style="color:red;">**Creative**</mark> mode. There is no bug using other gamemodes
{% endhint %}

{% hint style="info" %}
`ratio` <mark style="color:red;">**OR**</mark> `fixed_amount` option is required!
{% endhint %}

### One-time Repair item stackable

```yaml
# Example

repair_tool:
  material: PAPER
  itemname: <blue>Repair tool
  Mechanics:
    repair:
      ratio: 0.5         # Percentage of durability restored, relative to the item's current damage.

```

### One-time Repair item unstackable

```yaml
# Example

repair_tool:
  material: PAPER
  itemname: <blue>Repair tool
  Components:
    max_stack_size: 1
  Mechanics:
    repair:
      fixed_amount: 50         # Amount of durability restored.

```

### Reusable Repair item unstackable

```yaml
# Example

repair_tool:
  material: PAPER
  itemname: <blue>Repair tool
  Components:
    max_stack_size: 1
    durability: 50       # 50 uses
  Mechanics:
    repair:
      ratio: 0.5         # Percentage of durability restored, relative to the item's current damage.

```

### Whitelist and Blacklist

<pre class="language-yaml"><code class="lang-yaml"># Example

repair_tool:
  material: PAPER
  itemname: &#x3C;blue>Repair tool
  Components:
    max_stack_size: 1
    durability: 50       # 50 uses
  Mechanics:
    repair:
      ratio: 0.5         # Percentage of durability restored, relative to the item's current damage.
<strong>      whitelist:
</strong>      - DIAMOND_AXE
      - forest_sword
      blacklist:
      - forest_axe
      - DIAMOND_SWORD
</code></pre>
