MC1253

From MinecraftOnline
Jump to navigation Jump to search


Programmable Firework Display
About
ID MC1253
Type AIZO
Self-Triggering No
Clickable No
Input Any
Output None
Rail No
Sign Format
First line TBD
Second line [MC1253]
Third line ShowName
Fourth line (StopOnLow)
Craftbook Page

MC1253 is a Craftbook IC that plays a programmed firework show from a file in the CraftBook fireworks folder.

This IC is not fully properly implemented in 1.12.2 and will need revisions. Below is the intended functionality

Details

  • Third Line
    • ShowName
      • Required. Specifies the name of the firework show to play.
      • The name must contain only letters, numbers, and underscores.
      • The IC looks for a file named ShowName.txt or ShowName.fwk in the CraftBook fireworks folder.
      • If both files exist, the .txt file is used.
  • Fourth Line
    • (StopOnLow)
      • Intended to specify whether the show should stop when the input is deactivated.
      • This setting is currently affected by an implementation issue and doesn't work as intended.


Activating an input starts the configured firework show, provided the IC does not believe a show is already running.

When configured to stop on low, deactivating the input is intended to stop the show.

Firework Show Files

  • Firework shows must be placed in the CraftBook fireworks folder.
  • Two file formats are supported:
    • .txt — A basic format for launching individual fireworks.
    • .fwk — A Fyrestone-style format supporting named firework effects, sounds, locations, and timing.
  • Empty lines are ignored. Lines beginning with # are treated as comments; the Fyrestone format also supports trailing comments after #.

Firework File Formats

Basic format (.txt)

The basic format supports launching individual fireworks and specifying a delay between actions.

The following commands exist for it:

  • Launch
    • launch:Offset;Duration;Shape;Color;Fade(;Effect)
      • Offset — Required. The X, Y, and Z coordinates at which the firework should launch, relative to the IC block. Separate the coordinates with commas.
      • Duration — Required. The firework's flight duration, in seconds.
      • Shape — Required. The firework shape, using its registered name. If the shape is unknown, it defaults to ball.
      • Color — Required. The firework's primary color, specified as three comma-separated RGB values.
      • Fade — Required. The firework's fade color, specified as three comma-separated RGB values.
      • Effect — Optional. Set to twinkle to enable flickering or trail to enable a trail.
  • Wait
    • The implementation contains a wait command, but its parsing isn't working.

Fyrestone format (.fwk)

The Fyrestone format supports defining named firework effects and launching them later in the show.

  • Start
    • start Name
      • Begins defining a named firework effect.
      • Resets the effect builder for the new definition.
  • Set
    • set.shape Shape
      • Sets the firework shape using its registered name.
    • set.color R,G,B
      • Sets the primary firework color.
    • set.fade R,G,B
      • Sets the fade color.
    • set.flicker or set.twinkle
      • Enables flickering.
    • set.trail
      • Enables a trail.
    • Set commands are only processed while a named effect is being defined.
  • Build
    • build
      • Finishes the current effect definition and stores it under its name.
      • Multiple effects can be added to the same name by defining and building them more than once.
  • Location
    • location X,Y,Z
      • Changes the location used for subsequent firework launches, relative to the IC block.
  • Duration
    • duration Duration (precise)
      • Sets the duration used for subsequent firework launches.
      • Adding precise changes the duration setting from the firework flight modifier to its fuse duration.
  • Sound
    • sound SoundType (X,Y,Z) (Volume) (Pitch)
      • Plays the specified registered sound.
      • The optional coordinates specify an offset from the IC block.
      • Volume and pitch default to 1.0 when omitted.
  • Wait
    • wait Ticks
      • Pauses the show for the specified number of ticks before continuing.
  • Launch
    • launch Name
      • Launches a firework using the effects stored under the specified name.

Examples

Basic format (.txt)

This example launches a red ball firework with a white fade, two blocks above the IC.

launch:0,2,0;3;ball;255,0,0;255,255,255

Fyrestone format (.fwk)

This example defines a red firework effect with a white fade, then launches it two blocks above the IC.

start RedBurst
set.shape ball
set.color 255,0,0
set.fade 255,255,255
build
location 0,2,0
launch RedBurst