> 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/extras/assets.md).

# The assets folder

Textures, fonts and other files a script keeps inside its jar.

Images, fonts, text files and other script data live in `resources/` inside the jar. Paths are relative to your own `resources/` folder: `assets().text("words.txt")`, `render.drawTexture("logo.png", …)`, `fonts().register("title", "fonts/title")` look for files in the jar of the running script. You cannot go outside the folder: `..` and absolute paths are rejected.

```
MyScript.jar
  java/my/MyScript.java
  resources/logo.png
  resources/fonts/title.png
  resources/fonts/title.json
  resources/words.txt
```

When scripts load, Quick copies `resources/` from every jar into the resource pack `scripts\resources\assets\script\`. This is how the game sees textures, fonts and shaders. Do not edit the files there: on the next reload they are overwritten with the contents of the jar.

## Assets

The simplest way to read your file is `assets()`:

```java
for (String line : assets().lines("words.txt")) chat(line);
```

| Method         | Type           | Description                                               |
| -------------- | -------------- | --------------------------------------------------------- |
| `exists(path)` | `boolean`      | whether the file exists                                   |
| `text(path)`   | `String`       | contents or `null`                                        |
| `lines(path)`  | `List<String>` | file lines; an empty list if the file is missing          |
| `bytes(path)`  | `byte[]`       | bytes or `null`                                           |
| `list(path)`   | `List<String>` | file names in a subfolder; an empty string means the root |

You cannot write to resources. Anything the script needs to save goes to [Storage](/en/settings/storage.md).

## Textures

`drawTexture(id, …)` accepts a path inside `resources/` (`"logo.png"`) or a full game id (`"minecraft:textures/gui/sprites/hud/heart/full.png"`). By default the texture's own sampler is used. For sharp pixels use `NEAREST | CLAMP`, for smoothing when scaled down use `LINEAR | CLAMP`.

Billboards and meshes in the world take a texture the same way: `render.billboard(mesh, "marker.png", …)`.

## Fonts and shaders

A custom font needs a pair of files `name.png` and `name.json` in `resources/`. Register it with `fonts().register(name, "path/without/extension")`, details are on the [Styled text](/en/ui/text.md) page.

You do not need to put shaders in the jar: `shaders().register(name, vertex, fragment)` writes the sources to the pack itself. See [Shaders](/en/ui/shaders.md).

## Sizes

A single file inside a jar can be up to 32 MB. Keep in mind that the whole jar is read into memory on every reload, so heavy resources slow down reloading of all scripts.


---

# 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/extras/assets.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.
