Build custom firework rockets with the /give command
6 min read
A firework rocket carries a small data structure describing how high it flies and how it explodes. Each explosion has a shape, a set of colors, optional fade colors, and flags for a trail and a twinkle. Once you know the pieces, you can design elaborate multi-burst rockets from a single give command.
指南结果
A /give command for a firework rocket with the flight duration, shapes, and colors you choose.
推荐路径
- Open the Give module and choose firework_rocket.
- Set the flight duration from 1 to 3 to control how high it launches.
- Add one or more explosions, choosing a shape for each.
- Pick colors and optional fade colors, then toggle trail and twinkle.
- Copy the command and launch the rocket to check the effect.
Flight and the explosion list
On Java 1.20.5+ the data is a fireworks component: /give @p firework_rocket[fireworks={flight_duration:2,explosions:[{shape:"large_ball",colors:[I;16711680],has_trail:true,has_twinkle:true}]}]. flight_duration is 1 to 3 and sets how long the rocket climbs before bursting.
On Java 1.20.4 and older the same rocket uses the Fireworks NBT compound with Flight and an Explosions list. Selecting the version keeps the component-vs-NBT and the Int-array color format correct.
- flight_duration (or Flight) is 1 to 3.
- explosions is a list, so a rocket can burst several ways at once.
- 1.20.5+ uses the fireworks component; older uses the Fireworks NBT.
Shapes, colors, and fades
Each explosion has a shape: small_ball, large_ball, star, creeper, or burst. Colors are given as a packed-RGB integer array, so red is 16711680, white is 16777215, and any custom color is a single number. fade_colors adds a second color the sparks change to as they fall.
Colors are written as an Int array such as colors:[I;16711680,255], which mixes red and blue. Building it visually is far easier than converting hex to packed integers by hand.
- Shapes: small_ball, large_ball, star, creeper, burst.
- Colors and fade_colors are packed-RGB integer arrays.
- has_trail adds a comet tail; has_twinkle adds the crackle sparkle.
Multi-burst rockets
Because explosions is a list, one rocket can contain several bursts of different shapes and colors that all fire together. This is how show-piece fireworks and finale rockets are made.
The rocket is a normal item, so it also accepts a custom name and lore. Rename a finale rocket and stack the explosions for a signature effect in a map or server event.
Ship the copied artifact
Use this guide to produce the artifact a player or map maker will actually run: a copied command, ordered Project pack, or datapack resource. The final review should happen on that copied output, not only on the editable builder state.
When the workflow is version-sensitive, label the target version beside the command. When it uses selectors, scoreboards, bossbars, tags, loot tables, or project order, test those dependencies in a clean world before publishing the setup.
- Copy from Output for one command and from Project for ordered packs.
- Keep Java, Bedrock, and snapshot variants separate.
- Test destructive selectors with harmless output first.
- Update related presets when the guide becomes the canonical workflow.
相关指南与预设
常见问题
How do I make a custom firework with a command?
Use the fireworks component, for example /give @p firework_rocket[fireworks={flight_duration:2,explosions:[{shape:"large_ball",colors:[I;16711680]}]}]. On 1.20.4 and older use the Fireworks NBT compound instead.
What do the color numbers mean?
Colors are packed-RGB integers. Red is 16711680, green is 65280, blue is 255, and white is 16777215. Any custom color is a single integer, and they go in an Int array like [I;16711680,255].
How high does the rocket fly?
flight_duration (Flight in legacy NBT) ranges from 1 to 3. Higher values climb longer before exploding.
Can one rocket have multiple explosions?
Yes. explosions is a list, so add several entries with different shapes and colors and they all detonate together for a layered burst.
What shapes can an explosion be?
small_ball, large_ball, star, creeper, and burst. Each explosion in the list can use a different shape.
When should this guide become a Project pack?
Use Project when the workflow needs more than one command, has setup and cleanup order, or must be edited again after testing. One-off commands can stay in Output.