# Shockwave

{% hint style="success" %}
Have you purchased [WeaponMechanicsCosmetics](https://pluginify.org/resources/13/)? It is required for this Mechanic to work!
{% endhint %}

The shockwave mechanic spawns a dense ring of block-display puffs that travel rapidly outward from the target location along the ground. Each puff shrinks as it travels, so the ring reads as *dissolving* into the distance rather than ballooning to a giant size.

This pairs well with [Explosion Cloud](/mechanics/mechanics/explosion-cloud.md). The cloud erupts upward while the shockwave races outward across the ground.

| Argument         | Description                                                                                                                                                   | Default Value                                                |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| `blocks`         | A list of [References](https://cjcrafter.gitbook.io/core/references#material) that each puff cycles through over its lifetime.                                | <p>WHITE\_STAINED\_GLASS,<br>LIGHT\_GRAY\_STAINED\_GLASS</p> |
| `count`          | How many puffs make up the ring. Higher numbers make a denser shockwave.                                                                                      | 120                                                          |
| `speed`          | How fast each puff travels outward from the center.                                                                                                           | 3.2                                                          |
| `heightOffset`   | The vertical offset, in blocks, from the target location. Use a small positive value so the wave appears at ground level rather than clipping into the floor. | 0.2                                                          |
| `duration`       | How long each puff lives, in ticks. Longer values let the wave travel further.                                                                                | 30                                                           |
| `startSize`      | The size of each puff when it first spawns.                                                                                                                   | 1.5                                                          |
| `endSize`        | The size of each puff at the end of its lifetime. The puffs shrink from `startSize` to `endSize`.                                                             | 0.0                                                          |
| `randomRotation` | Use `true` to slowly tumble each puff, which reads as "rolling debris" rather than a grid of identical blocks.                                                | true                                                         |

{% hint style="info" %}
This mechanic uses block display entities, so it only works on Minecraft 1.19.4+ servers.
{% endhint %}

{% tabs %}
{% tab title="Example 1" %}

```yaml
Mechanics:
  - "Shockwave{} @Target{}"
```

Spawns a dense white shockwave ring at the target. The puffs race outward, shrinking as they go, then disappear after 30 ticks.
{% endtab %}

{% tab title="Example 2" %}

```yaml
Mechanics:
  - "Shockwave{count=240, speed=5.0, duration=45} @Target{}"
```

A wider, denser, longer-lasting shockwave. Good for massive area-of-effect explosions like nukes or artillery strikes.
{% endtab %}

{% tab title="Example 3" %}

```yaml
Mechanics:
  - "Shockwave{blocks=[BROWN_CONCRETE, DIRT, COARSE_DIRT], startSize=1.0, endSize=0.0, count=60} @Target{}"
```

A small dust shockwave kicked up from the ground. Perfect for grenade impacts on dirt or sand.
{% endtab %}

{% tab title="Example 4" %}
This example comes from the WeaponMechanicsCosmetics `Sky_Torch` orbital laser:

```yaml
Mechanics:
  - "Shockwave{delayBeforePlay=44} @Target{}"
```

Fires the instant the orbital beam impacts the target. The ground-level wave races outward as the mushroom cloud rises behind it.
{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://cjcrafter.gitbook.io/mechanics/mechanics/shockwave.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
