> 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/en/start/ide.md).

# Setup

Setting up an IDE and building a script jar.

Quick compiles scripts itself, so you need an IDE for code completion and for building the jar with one click. Quick puts all the files you need into `scripts\.api\` on every launch:

| File                     | What it is                                                 |
| ------------------------ | ---------------------------------------------------------- |
| `script-api.jar`         | SDK classes; add this file as a library                    |
| `script-api-sources.jar` | sources with javadoc: hints, parameter names, descriptions |
| `README.txt`             | a short note on what goes where inside the jar             |

## IntelliJ IDEA

1. Create an empty Java project. Name the source folder `java`, so you can pack it as is.
2. Open **File → Project Structure → Libraries → + → Java** and select `script-api.jar`.
3. In the same library, click **+ → `script-api-sources.jar`** and mark it as Sources.
4. Mark `java` as Sources Root. Next to it, create a `resources` folder for images and fonts and a `mixin` folder for mixins.

Code completion now knows every class in `hex.script.api`, and hints show the javadoc descriptions. Use Java 21.

For mixins you also need the game classes and the Mixin library itself. The easiest way to get them is from any Fabric project on Minecraft 26.2 with Mojang mappings. See [Mixins and hooks](/en/extras/mixins.md) for details.

## Building the jar

A jar is a regular zip with the `java/`, `mixin/` and `resources/` folders at its root. You do not need to compile the classes. If you put compiled classes in the jar, Quick simply does not read them.

With an IDEA artifact: **Project Structure → Artifacts → + → JAR → Empty**. Add the `java` and `resources` folders as Directory Content and set the scripts folder as the output directory. After that, **Build → Build Artifacts** updates the script in the game right away.

With 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") }
}
```

You can also pack the folders with any archiver and change the extension from `.zip` to `.jar`.

## Several scripts in one jar

A jar can contain any number of `Script` subclasses, and each of them becomes a separate module. Shared code for them goes into regular classes in the same jar. Classes from different jars cannot see each other.

The jar name without the extension is the bundle identifier. Resources go into the pack under this name, and mixins live under it too. That is why Quick will not load two jars with the same name.

## What you can use

Available: `java.lang`, `java.util`, `java.math`, `java.time`, `java.text`, `org.joml`, `fastutil` and `hex.script.api`. Files, network, reflection, threads and game classes are closed, see [Sandbox and limits](/en/extras/limits.md) for details. To read files, use `assets()`. To save data, use `storage()`.

You can also write scripts without an IDE, with the help of an AI agent. The setup is described in [MCP for AI agents](/en/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/en/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.
