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

# Звуки и частицы

Локальные звуки и частицы, которые не отправляются на сервер.

Звуки и частицы из этого раздела локальные: их видит и слышит только сам игрок, на сервер ничего не отправляется. Они подходят для сигналов и подсветки.

## Sounds

Звук задаётся id из реестра игры. Пространство имён можно не указывать: `"entity.player.levelup"` Quick поймёт как `"minecraft:entity.player.levelup"`. Если id указан неверно, вызов вернёт `false`.

```java
sounds().play("entity.experience_orb.pickup", 1f, 1.2f);
sounds().stop("music_disc.cat");
```

| Метод                              | Тип        | Описание                                                                                          |
| ---------------------------------- | ---------- | ------------------------------------------------------------------------------------------------- |
| `play(id)`                         | `boolean`  | у игрока, с обычной громкостью и тоном                                                            |
| `play(id, volume, pitch)`          | `boolean`  | `volume` ограничивается диапазоном 0..16, `pitch` диапазоном 0.5..2                               |
| `play(id, x, y, z, volume, pitch)` | `boolean`  | в точке мира: громкость и направление зависят от положения точки                                  |
| `stop(id)`                         | `boolean`  | заглушает все копии этого звука                                                                   |
| `stopAll()`                        | `void`     | заглушает все звуки, включая музыку                                                               |
| `names()`                          | `String[]` | все id, их больше тысячи; массив собирается при каждом вызове, поэтому лучше сохранить его в поле |

Чтобы реагировать на другие звуки, подпишитесь на событие `SoundEvent`, см. [Подписка на события](/events/basics.md).

## Particles

Тип частицы тоже задаётся id из реестра: `"flame"`, `"end_rod"`, `"crit"`. `spawn` подходит для типов без параметров. Для частиц, которым нужны данные, есть отдельные методы.

| Метод                                           | Описание                                                                          |
| ----------------------------------------------- | --------------------------------------------------------------------------------- |
| `spawn(id, x, y, z)`                            | одна неподвижная частица                                                          |
| `spawn(id, x, y, z, dx, dy, dz)`                | со стартовой скоростью; как её использовать, решает сам тип                       |
| `spawn(id, x, y, z, count, spread)`             | облако частиц; `count` 1..512, `spread` это разброс в блоках                      |
| `dust(color, scale, x, y, z)`                   | цветная пыль, как от редстоуна; `color` в формате `0xRRGGBB`                      |
| `dust(color, scale, x, y, z, count, spread)`    | облако пыли                                                                       |
| `dust(from, to, scale, x, y, z, count, spread)` | пыль с переходом из одного цвета в другой                                         |
| `colored(id, color, x, y, z, count, spread)`    | частицы, цвет которых задаётся снаружи: `entity_effect`, `tinted_leaves`, `flash` |
| `block(id, block, x, y, z, count, spread)`      | осколки блока: `block`, `block_marker`, `falling_dust`, `dust_pillar`             |
| `item(id, item, x, y, z, count, spread)`        | осколки предмета, частица `item`                                                  |

Все эти методы возвращают `false`, если тип неизвестен, ему нужны другие параметры или игрок не в мире.


---

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