Firework Launcher - theoriginalbit/MoarPeripherals GitHub Wiki

Firework Launcher
Type: fireworklauncher
ID No.: 3482
Name: MoarPeripherals:blockFireworkLauncher

The Firework Launcher is a peripheral block that can be used to craft and launch firework rockets. It offers functions to craft firework stars and firework rockets, move them back and forth between it's internal buffer and player accessible inventory, as well as launch the completed firework rockets. Also available in creative mode is a creative version of the Firework Launcher: it operates identically to the standard launcher with the exception that it requires no materials to construct stars and rockets and has no inventory so it cannot load pre-made stars or rockets.

An example firework builder and launcher, "StarCaster", is included with MoarPeripherals.

This MoarPeripherals version of the Firework Launcher is similar to that seen in the MiscPeripherals mod (which is only compatible with older builds of ComputerCraft).

##Functions

Name Returns Description
isCreativeLauncher() boolean answer Returns true if the launcher is creative or false if survival.
craftFireworkStar(number color(s), number shape 1, number effect 2) boolean success, number starID Crafts a firework star with the color(s), shape, and effect specified and one gun powder, then stores it in the launcher's internal buffer.
craftFireworkRocket(number launchHeight[1-3], table starIDTable) boolean success, number rocketID Crafts a ready-to-launch firework rocket and stores it in the launcher's internal buffer.
getInventorySize() number of slots Returns the number of slots in the player accessible inventory
getStackInSlot(number slot) table stackInfo Returns a table of information about the item stack
getFireworkStarIds() table starIDs Returns a table of firework star IDs
getFireworkRocketIds() table rocketIDs Returns a table of firework rocket IDs
inspectFireworkRocket(number rocketID) string contents Returns a serialized table of the contents of the firework rocket
inspectFireworkStar(number starID) string contents Returns a serialized table of the contents of the firework star
load(number slot number) boolean success Loads a firework star or firework rocket from player accessible inventory to the launcher's internal buffer.
canLaunch() boolean success Determines if a valid firework rocket is loaded and ready to launch.
launch() boolean success Launches the next firework rocket in the launcher's internal buffer.
unloadFireworkStar(number starID) boolean success Moves the specified firework star from the launcher's internal buffer to player accessible inventory or drops it into the world if no inventory spaces are available.
unloadFirworkRocket(number rocketID) boolean success Moves the specified firework rocket from the launcher's internal buffer to player accessible inventory or drops it into the world if no inventory spaces are available.

1

Number Shape Ingredient
0 Standard Ball none
1 Large Ball Fire Charge
2 Star Shape Gold Nugget
3 Creeper Face Head (any)
4 Burst Feather

2

Number Effect Ingredient
0 No effect none
1 Twinkle Glowstone dust
2 Explosion Trail Diamond
3 Twinkle & Trail Glowstone & Diamond

##Recipe

Recipe

##Version History

Build Date Details
v1.5.0 15 December 2014 Added Firework Launcher and Creative Firework Launcher.