I'd like to give some firework items to a player, using a dispenser, or via some similar mechanism. How can I do this? Is it possible?
|
|
Unfortunately, when using a dispenser, the fireworks leave the dispenser armed, so that isn't much good.
Also becuase the fireworks all share an ID, 401, command blocks can't be used (it just spawns a firework with no explosion in it). You can however use spawners to spawn the dropped item entity (one of Seth Bling's scripts can be used) but these are harder to control, and limiting the amount of items the player gets can be tricky.
Note this technique can be used to spawn any custom item, such as enchanted weapons and custom potions. |
|||||||||
|
|
The upcoming Dropper block in Minecraft 1.5 will likely be usable for this purpose. It acts exactly like a dispenser, except that it always gives items rather than activating them, so it will not launch fireworks. |
|||
|
|
|
Because fireworks have weird metadata I made a tool to make fireworks easy. They are saved as kits so if you want players to have them, just give them access to the kit. You can find the tutorial at It's really simple to make complex and custom fireworks using this method. |
||||
|
|
|
If you're playing on a CraftBukkit server, the Essentials plugin has a /firework command. You could give your players fireworks through the /give (item code 401) command and then let the players "customise" the fireworks with the /fireworks command. The syntax for the command is (and will be applied to the stack of fireworks currently held in-hand)
You can choose three colours for the inital burst using So, do a /give 401 for 64 fireworks, and then for a firework which bursts red, blue and green, does a large ball effect, twinkles/crackles and has maximum flight height you can use:
|
|||||||
|
|
I have not tried this yet but I was thinking you could do this with a few Bukkit plugins - WorldEdit, Citizens, and Denizen.
I believe this should work as Denizen scripts allow you to load WorldEdit schematics. |
||||
|
|



