# FireworkExplosionHelper

`com.jsmacrosce.jsmacros.client.api.helper.inventory.FireworkExplosionHelper`

**Since:** 2.3.0

Describes the appearance of a firework star or an explosion stored in a rocket.  
 ```js
const explosion = Player.getPlayer()?.getMainHand().getComponents().getFireworkExplosion();  
if (explosion != null) Chat.log(`${explosion.getShape()}: ${explosion.getColors().size()} colors`);  
 ```

## Methods

### getColors {#com.jsmacrosce.jsmacros.client.api.helper.inventory.FireworkExplosionHelper_getColors-}

```js
getColors(): List<Integer>
```

**Returns:** the starting colors as packed RGB integers in stored order

### getFadeColors {#com.jsmacrosce.jsmacros.client.api.helper.inventory.FireworkExplosionHelper_getFadeColors-}

```js
getFadeColors(): List<Integer>
```

**Returns:** the fade colors as packed RGB integers, or an empty list when none are set

### getShape {#com.jsmacrosce.jsmacros.client.api.helper.inventory.FireworkExplosionHelper_getShape-}

```js
getShape(): String
```

**Returns:** the shape name, such as `"small_ball"`, `"star"`, or `"creeper"`

### hasTrail {#com.jsmacrosce.jsmacros.client.api.helper.inventory.FireworkExplosionHelper_hasTrail-}

```js
hasTrail(): boolean
```

**Returns:** whether the explosion leaves a trail

### hasTwinkle {#com.jsmacrosce.jsmacros.client.api.helper.inventory.FireworkExplosionHelper_hasTwinkle-}

```js
hasTwinkle(): boolean
```

**Returns:** whether the explosion twinkles
