Skip to content

FireworkExplosionHelper ​

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

Since2.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 ​

getColors(): List<Integer>#
Returns: the starting colors as packed RGB integers in stored order

getFadeColors ​

getFadeColors(): List<Integer>#
Returns: the fade colors as packed RGB integers, or an empty list when none are set

getShape ​

getShape(): String#
Returns: the shape name, such as "small_ball", "star", or "creeper"

hasTrail ​

hasTrail(): boolean#
Returns: whether the explosion leaves a trail

hasTwinkle ​

hasTwinkle(): boolean#
Returns: whether the explosion twinkles