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

# Подготовка

Настройка IDE и сборка jar со скриптом.

Скрипты компилирует сам Quick, поэтому IDE нужна для подсказок и для сборки jar одной кнопкой. Все нужные файлы Quick кладёт в `scripts\.api\` при каждом запуске:

| Файл                     | Что это                                                    |
| ------------------------ | ---------------------------------------------------------- |
| `script-api.jar`         | классы SDK, этот файл подключается как библиотека          |
| `script-api-sources.jar` | исходники с javadoc: подсказки, имена параметров, описания |
| `README.txt`             | короткая памятка о том, что где лежит в jar                |

## IntelliJ IDEA

1. Создайте пустой Java-проект. Папку с исходниками назовите `java`, тогда её можно упаковать без изменений.
2. Откройте **File → Project Structure → Libraries → + → Java** и выберите `script-api.jar`.
3. В той же библиотеке нажмите **+ → `script-api-sources.jar`** и отметьте его как Sources.
4. Отметьте `java` как Sources Root. Рядом создайте папку `resources` для картинок и шрифтов и папку `mixin` для миксинов.

После этого автодополнение знает все классы из `hex.script.api`, а в подсказках видны описания из javadoc. Версия Java 21.

Для миксинов дополнительно нужны классы игры и сама библиотека Mixin. Их проще всего взять из любого Fabric-проекта на Minecraft 26.2 с маппингами Mojang. Подробнее на странице [Миксины и хуки](/extras/mixins.md).

## Сборка jar

Jar это обычный zip, в корне которого лежат папки `java/`, `mixin/` и `resources/`. Компилировать классы не нужно. Если положить в jar скомпилированные классы, Quick их просто не читает.

Через артефакт IDEA: **Project Structure → Artifacts → + → JAR → Empty**. Добавьте папки `java` и `resources` как Directory Content и укажите папку скриптов как выходную. После этого **Build → Build Artifacts** сразу обновляет скрипт в игре.

Через Gradle:

```kotlin
tasks.register<Zip>("script") {
    archiveFileName.set("MyScript.jar")
    destinationDirectory.set(file(System.getProperty("user.home") + "/AppData/Roaming/.minecraft/Hex/scripts"))
    from("src/main/java") { into("java") }
    from("src/main/mixin") { into("mixin") }
    from("src/main/resources") { into("resources") }
}
```

Можно также упаковать папки любым архиватором и поменять расширение `.zip` на `.jar`.

## Несколько скриптов в одном jar

В одном jar может быть сколько угодно наследников `Script`, и каждый из них станет отдельным модулем. Общий код для них пишется обычными классами в том же jar. Классы из разных jar друг друга не видят.

Имя jar без расширения служит идентификатором бандла. Под этим именем ресурсы попадают в пак, и под ним же лежат миксины. Поэтому два jar с одинаковым именем Quick не загрузит.

## Что можно использовать

Доступны `java.lang`, `java.util`, `java.math`, `java.time`, `java.text`, `org.joml`, `fastutil` и `hex.script.api`. Файлы, сеть, рефлексия, потоки и классы игры закрыты, подробности на странице [Песочница и лимиты](/extras/limits.md). Для чтения файлов есть `assets()`, для сохранения данных `storage()`.

Скрипты можно писать и без IDE, с помощью ИИ-агента. Настройка описана на странице [MCP для нейросетей](/extras/mcp.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.quickclient.cc/start/ide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
