FIREWORK!

A fireworks/particle effects datapack for Minecraft (1.21.11 environment). It provides a large number of function-based effects, glyphs, and firework summoning logic.

46

Quick challenge

How far can you run before the mobs catch you?

FIREWORK!

FIREWORK!

Introduction

- A firework / particle effects datapack for Minecraft 1.21.11. - Author: Mxpea (Aurelith / Mxpea). - Automatically initializes scoreboards and storage, providing random fireworks, rainbow, ring, ray, line, letter pixel effects, and more.

Feature Overview

- Auto-load and Tick - Load function: `firework:load` - Tick function: `firework:tick` - Registration files: load.json / tick.json

- Random Firework - Main entry: `firework:fireworks/ran_firework` - Parameter subroutines: `effects/fireworks_ran/`

- Particles & Rainbow - Rainbow value generation: `firework:effects/rainbow/rainbow_color_gen` - Rainbow particle entry: `firework:run/rainbow` - Random flash x10: `firework:run/ran_flash_10` - Random Dust: `firework:run/ran_dust`

- Rings, Rays, Lines - Rings: `firework:run/ring_normal`, `firework:run/ring_rainbow` - Rays: `firework:run/ray_summon` - Lines: `firework:run/line_summon`

- Lightning Effect - Lightning entry: `firework:run/lightning_summon` - Calculation routines: `lightning/`

- Spherical Particles - Sphere entry: `firework:run/ball_summon` - Calculation routines: `ball/`

- Other Effects & Utilities - Colored falling block explosion: `firework:run/colord_block_exp` - UUID utilities: `firework:gu/generate`, `firework:gu/convert`, `firework:tools/uuid_get` - Letter pixels: `letters/`

Quick Start

1. Place the `firework/` folder into the world's `datapacks/` directory. 2. Run any entry function to test effects (see example commands below).

> Note: `firework:load` initializes many scoreboards (e.g., `rings`, `ray_settings`, `line`) and storage keys.

Example Commands

- `/function firework:fireworks/ran_firework`: Generates a random firework (colors, trail, twinkle, type random). - `/function firework:run/ran_flash_10`: Triggers 10 random flash particles in quick succession, good for strobe effects. - `/function firework:run/ran_dust`: Spawns a random colored dust particle. - `/function firework:run/rainbow`: Spawns rainbow particles using current rainbow parameters. - `/function firework:run/ring_normal`: Renders a ring with fixed particles (end_rod). - `/function firework:run/ring_rainbow`: Renders a ring with rainbow particles. - `/function firework:run/ray_summon`: Spawns a ray effect (requires velocity/lifetime parameters set first). - `/function firework:run/line_summon`: Draws line particles between start and end points with step count. - `/function firework:run/lightning_summon`: Spawns a lightning effect (requires attraction strength/step length etc. set first). - `/function firework:run/ball_summon`: Spawns spherical particles based on radius and layer count. - `/function firework:run/colord_block_exp`: Spawns a colored falling block explosion (depends on Motion API). - `/function firework:letters/a`: Draws the pixel pattern of letter A. - `/function firework:gu/generate`: Generates UUID data and writes to storage. - `/function firework:tools/uuid_get`: Reads and displays UUID info of current entity/context.

Parameter Setup Hints (Common)

- Ring effect depends on: `steps rings`, `distance rings`. - Sphere effect depends on: `steps ball`, `distance ball` (distance ball is radius; implementation uses scaled storage for finer control). - Ray effect depends on: `speed ray_settings`, `lifetime ray_settings`, `offset_x ray_settings`, `offset_y ray_settings`. - Line effect depends on: `steps line`, and requires `tag @s add set_poz` to record endpoint coordinates. - Lightning effect depends on: `attrack lightning`, `stepl lightning`, `delta lightning`, `maxstep lightning`, and requires `tag @s add set_poz` to record endpoint coordinates.

Directory Index

- Entry functions: run/ - Firework parameter routines: effects/fireworks_ran/ - Ring calculation: effects/ring/ - Sphere: ball/ - Ray: ray/ - Line: line/ - Lightning: lightning/ - Letters: letters/

Dependencies

- This pack does not include `Mxpea.s.Motion.API`. Some colored falling block effects (e.g., `firework:run/colord_block_exp`) depend on that API.

Common Issues

- `/function` no response: Verify datapack path and run `/reload`, check that load.json and tick.json exist. - Ray/line not executing: Set required scoreboard parameters first (see "Parameter Setup Hints" above). - Sphere effect not showing: Check that `steps ball` > 0 and `distance ball` is within a reasonable range.

License

- This project is licensed under the MIT License, see LICENSE.

Acknowledgements

- Includes UUID-related code from gu, originally under The Unlicense; redistributed according to its terms.

ADS