# Кастомный тир

*Что делать, если Вы вдруг захотели сделать кирку с уровнем добычи выше незерита?* Вам нужно создать свой собственный тир предметов, в котором установите уровень добычи. Помимо уровня добычи так же можно добавить прочность, скорость добычи, уровень зачарования, урон и предмет для починки.

***

**Создадим новый ивент** `item.registry.tool_tiers`

```javascript
// priority: 0
console.info('Hello, World! (You will only see this line once in console, during startup)')
onEvent('item.registry.tool_tiers', event => {
 event.add('godtier', tier => {
 tier.uses = 5000
 tier.speed = 12.0
 tier.attackDamageBonus = 14.0
 tier.level = 6
 tier.enchantmentValue = 14
 tier.repairIngredient = '#forge:ingots/iron'
 })
})
onEvent('item.registry', event => {
 event.create('shadow_piece').maxStackSize(32).burnTime(340)
 //Мечь
 event.create('custom_sword', 'godtier').tier('diamond').attackDamageBaseline(10.0)
 //Кирка
 event.create('custom_pickaxe', 'godtier').tier('diamond')
})

```

Рассмотрим данный скрипт:

* **event.add(’имя тира’, tier ⇒** { - создание нового тира.
* **tier.uses** - Прочность предметов.
* **tier.speed** - Скорость добычи.
* **tier.attackDamageBonus** - Бонусный урон.
* **tier.level** - Уровень добычи.
* **tier.enchantmentValue** - Уровень зачарований.
* **tier.repairIngredient** - Предмет для починки.

И теперь вместо значения `diamond` мы ставим свой тир – `godtier`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.aegis-mine.ru/modifications/sozdanie-kontenta/kubejs/kastomnyi-tir.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
