# ⚙️Main Configuration

**Welcome to the MagicTools plugin configuration guide!**

### unbreakable-block:

Blocks that cannot be broken by the drill, which has a 3x3 range, are listed as unbreakable blocks. The drill will skip breaking those blocks!

### custom-tools:

How can we create custom tools?

Here is an example of how to create a custom tool:

```yaml
  <custom-tool>:
    tool: NETHERITE_PICKAXE   # Base item.
    name: "&#8e23eaCUSTOM TOOLS"
    lore:
      - "&73x3 Miner"
    break-durability: 9  # 3x3 block area = 9 durability loss.
    enchantments:
      - "efficiency:5"
      - "mending:1"
      - "unbreaking:3"
    action: DRILL  # Select tool ability.
    radius: 1  # Affects a 1-block radius. = 3x3
    max-use-amount: -1 # Time tool can use if you set it 1 it will only 1 time can use after that the tool will break.
    action-only-block: []  # Leave empty for all blocks.
    ignore-block: []  # Blocks to ignore.
    effect-particle: "DRAGON_BREATH"
    effect-sound: "ORB_PICKUP"
    custom-model-data: -1
```

### What is a break-durability config?

Break durability refers to the durability of a tool that is consumed each time a block is broken. In this magic tools system, you can customize the durability loss for each block break.

### What is action config?

The action configuration allows you to select the action for the tools. For example, if you set the action to 'drill,' the custom tool will function as a drilling tool, and all action requests will require the 'radius' configuration!

```yaml
action: DRILL
```

* Available Actions:

```yaml
+   DRILL          - Mines in an area.
+   VEIN           - Mines connected blocks.
+   SNEAK_DRILL    - Drill only when sneaking.
+   SNEAK_VEIN     - Vein mine only when sneaking.
+   FARMER         - Auto-harvest crops.
+   SNEAK_FARMER   - Harvest crops while sneaking.
+   AUTO_REPLANT   - Auto replant crop on farming.
```

### How to use radius config?

It can be difficult to understand the concept of radius if you are not familiar with coordinates. The radius is used in such a way that when a block is broken, it acts as the center block. From the center block, a radius of 1 extends to (x, y, z), resulting in a 3x3 area.

```yaml
radius: 1
```

* Here are the free radius configurations:

<pre><code><strong>"radius: 1" = 3x3
</strong>"radius: 2" = 5x5
"radius: 3" = 7x7
"radius: 4" = 9x9
"radius: 5" = 11x11
"radius: 6" = 13x13
"radius: 7" = 15x15
"radius: 8" = 17x17
"radius: 9" = 19x19"
</code></pre>

### What is max-use-amount config?

The max use amount configuration sets the maximum number of times a tool can be used. If you set the max use amount to 1, the tool will only be usable once; after that, it will break.

```yaml
max-use-amount: -1
```

Set max-use-amount -1 to disable!

### What is action-only-block config?

This configuration is for actions that apply only to specific blocks. For example, if you want to use an axe for vein mining, you can set the action to apply only to a list of wood types. The tool will then function only when breaking blocks that are included in that list.

```yaml
action-only-block:
  - OAK_LOG
  - SPRUCE_LOG
  - BIRCH_LOG
  - JUNGLE_LOG
  - ACACIA_LOG
  - DARK_OAK_LOG
  - MANGROVE_LOG
  - CHERRY_LOG
  - OAK_WOOD
  - SPRUCE_WOOD
  - BIRCH_WOOD
  - JUNGLE_WOOD
  - ACACIA_WOOD
  - DARK_OAK_WOOD
  - MANGROVE_WOOD
  - CHERRY_WOOD
```

### What is a ignore-block config?

This configuration is similar to the unbreakable-block setting, but it applies to tools. It allows the tool to skip or ignore specified blocks!

```yaml
ignore-block:
  - GLASS
  - SHULKER_BOX
```

### How to use effect config?

Effect Particles is a particle effect that spawns on mine.

Use "NONE" to disable particles effect!

```
effect-particle: "DRAGON_BREATH"
```

Effect Sound is a sound that plays on mine.

Use "NONE" to disable sounds effect!

```
effect-sound: "ENTITY_VILLAGER_YES"
```
