Updated:
Give a custom rocket
| Version | Red large ball fading to yellow |
|---|---|
| Java 1.20.5+ | /give @p minecraft:firework_rocket[fireworks={flight_duration:2,explosions:[{shape:"large_ball",colors:[I;16711680],fade_colors:[I;16776960],has_trail:true,has_twinkle:true}]}] |
| Java 1.20.4 and earlier | /give @p minecraft:firework_rocket{Fireworks:{Flight:2,Explosions:[{Type:1,Colors:[I;16711680],FadeColors:[I;16776960],Trail:1b,Flicker:1b}]}} |
1.20.5 switched items from NBT in braces to components in square brackets and renamed the fields. Using the wrong format gives an error or a rocket that does not explode.
Field names
| 1.20.5+ | Older | Meaning |
|---|---|---|
flight_duration | Flight | Height (1–3); also elytra boost length |
shape | Type | Explosion shape |
colors | Colors | Explosion colors |
fade_colors | FadeColors | Colors it fades to (optional) |
has_trail | Trail | Sparkle trail (like adding a diamond) |
has_twinkle | Flicker | Crackle (like adding glowstone dust) |
Shapes
| Shape | 1.20.5+ | Older |
|---|---|---|
| Small ball | small_ball | 0 |
| Large ball | large_ball | 1 |
| Star | star | 2 |
| Creeper | creeper | 3 |
| Burst | burst | 4 |
Color numbers
| Color | Number |
|---|---|
| Red | 16711680 |
| Green | 65280 |
| Blue | 255 |
| Yellow | 16776960 |
| White | 16777215 |
| Pink | 16738740 |
The number is red × 65536 + green × 256 + blue. Orange (255, 128, 0) is 16744448. List several as [I;16711680,255] to mix colors; the I; is required.
Launch one on the spot
/summon minecraft:firework_rocket ~ ~ ~ {LifeTime:30,FireworksItem:{id:"minecraft:firework_rocket",count:1,components:{"minecraft:fireworks":{explosions:[{shape:"star",colors:[I;65280]}]}}}}
A green star bursts above the command's position (1.20.5+). LifeTime is the time in ticks before it explodes. Put it in a command block behind a button for a firework launcher. On 1.20.4 and earlier the item uses Count:1b,tag:{Fireworks:{Explosions:[{Type:2,Colors:[I;65280]}]}}.
Elytra rockets
/give @p minecraft:firework_rocket[fireworks={flight_duration:3}] 64
With no explosions, the rocket does no damage, which is what you want for elytra flight. Rockets with explosions hurt you when used for flying.
Common problems
- No explosion: you used the old
{Fireworks:…}form on 1.20.5+. - Black or missing color: the list needs
I;before the numbers. - Summoned rocket vanishes: LifeTime is too short or it hit a ceiling.
- Bedrock: /give cannot set shapes or colors; craft firework stars instead.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.