> 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/actions/prediction.md).

# Предсказание

Положение игрока через несколько тиков и траектории снарядов.

`prediction()` показывает, где игрок окажется через несколько тиков и куда упадёт снаряд. Движение просчитывается на теневом игроке Quick, а полёт снарядов считается той же баллистикой, что использует сам Quick.

```java
Motion landing = prediction().after(10);
if (landing != null) {
    Point at = landing.position();
    render.box(at.x() - 0.3, at.y(), at.z() - 0.3, at.x() + 0.3, at.y() + 0.1, at.z() + 0.3, 0xFFFF3B30, true);
}

Trajectory arrow = prediction().projectile("arrow");
if (arrow.lands()) render.tracer(arrow.landing().x(), arrow.landing().y(), arrow.landing().z(), -1, true);
```

## Как это работает

* Первый блок рисует красную площадку там, где игрок будет через 10 тиков.
* Второй проводит линию к точке, куда упадёт стрела, если выстрелить прямо сейчас.

| Метод                          | Тип            | Описание                                                                                                     |
| ------------------------------ | -------------- | ------------------------------------------------------------------------------------------------------------ |
| `after(ticks)`                 | `Motion`       | состояние игрока через N тиков, 1..100; `null`, если игрок не в мире                                         |
| `path(ticks)`                  | `List<Motion>` | весь путь по тикам, без нулевого                                                                             |
| `projectile(kind)`             | `Trajectory`   | полёт по текущему взгляду со штатной силой                                                                   |
| `projectile(kind, aim, power)` | `Trajectory`   | `aim` задаёт направление, при `null` берётся последний отправленный поворот; `power` 0 означает штатную силу |

Снаряды: `"arrow"`, `"trident"`, `"pearl"`, `"snowball"`, `"potion"`.

Расчёт идёт от текущего ввода: если зажата W, теневой игрок тоже идёт вперёд. Действия, которые скрипт уже выполнил через `control()` в этом тике, тоже учитываются.

## Motion

| Метод                                    | Тип       | Описание                 |
| ---------------------------------------- | --------- | ------------------------ |
| `position()`                             | `Point`   | положение ног            |
| `velocity()`                             | `Point`   | скорость в блоках за тик |
| `onGround()`, `inWater()`, `sprinting()` | `boolean` | состояние в этом тике    |

## Trajectory

| Метод           | Тип           | Описание                      |
| --------------- | ------------- | ----------------------------- |
| `points()`      | `List<Point>` | точки по тикам                |
| `lands()`       | `boolean`     | попал ли снаряд во что-нибудь |
| `landing()`     | `Point`       | точка попадания или `null`    |
| `flightTicks()` | `int`         | сколько тиков снаряд в полёте |


---

# 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/actions/prediction.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.
