> For the complete documentation index, see [llms.txt](https://twightlight.gitbook.io/hlootchest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://twightlight.gitbook.io/hlootchest/configurations/lootchest-config.md).

# LootChest config

{% hint style="info" %}
Since 1.1.3, "lootchests.yml" is no longer exist and replaced my multiple config file located in "lootchests" folder.
{% endhint %}

### **1. Main Reward Configuration**

```yaml
regular: (A.k.a lootchest type indentifier.)
  icon:
    material: PLAYER_HEAD
    data: 3
    head_value: <custom_texture>
  reward-amount: 3 (The amount of rewards will be given. The rewards-location amount must be equals or higher than this amount!)
```

### **2. Configuring the Rewards List**

Reward button is almost the same with the template button but has some additional options:

* **`chance`** → The probability (%) of receiving the reward.
* **`rewards`** → Actions executed when the reward is obtained (not on clicked, please caution!).

#### **Example Reward Entry:**

```yaml
rewards-list:
  '1':
    icon:
      material: BARRIER
      data: 0
    holding-icon: true
    rotations:
      '1':
        position: RIGHT_ARM
        value: -90, 0, 90
    click-sound:
      sound: UI_BUTTON_CLICK
      yaw: 10
      pitch: 10
    hover-sound:
      sound: ENTITY_CHICKEN_EGG
      yaw: 5
      pitch: 5
    move-forward: true
    name:
      enable: false
      name: ''
    chance: 30
    rewards:
      - '[console] give {player} dirt 1'
    actions:
      - '[message] Congrats, it works!'
    children:
      '1':
        location-offset: 0.5 * VectorX, -1.3, 0.5 * VectorZ
        name:
          enable: true
          display-name: '&aDirt x1'
```

#### **Explanation:**

* **`chance: 30`** → 30% chance to win this reward.
* **`rewards`** → Executes the command `[console] give {player} dirt 1` when won.
* **`actions`** → Sends a message on click.
