{"id":19746548,"url":"https://github.com/blockhorizons/fireworks","last_synced_at":"2026-03-04T03:02:23.923Z","repository":{"id":33642321,"uuid":"138229083","full_name":"BlockHorizons/Fireworks","owner":"BlockHorizons","description":"Add fireworks to your PocketMine server","archived":false,"fork":false,"pushed_at":"2023-06-21T21:31:10.000Z","size":37,"stargazers_count":31,"open_issues_count":7,"forks_count":15,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-16T14:22:09.400Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlockHorizons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"open_collective":"blockhorizons"}},"created_at":"2018-06-21T22:44:52.000Z","updated_at":"2024-01-13T17:51:09.000Z","dependencies_parsed_at":"2024-04-17T10:34:50.979Z","dependency_job_id":null,"html_url":"https://github.com/BlockHorizons/Fireworks","commit_stats":{"total_commits":12,"total_committers":5,"mean_commits":2.4,"dds":0.5,"last_synced_commit":"d25bbf8af1b8af723036c31fe72a8910deaf3cfd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BlockHorizons/Fireworks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockHorizons%2FFireworks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockHorizons%2FFireworks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockHorizons%2FFireworks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockHorizons%2FFireworks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlockHorizons","download_url":"https://codeload.github.com/BlockHorizons/Fireworks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockHorizons%2FFireworks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30070479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T01:03:42.280Z","status":"online","status_checked_at":"2026-03-04T02:00:07.464Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T02:14:49.514Z","updated_at":"2026-03-04T03:02:23.917Z","avatar_url":"https://github.com/BlockHorizons.png","language":"PHP","readme":"# Fireworks\nAdds fireworks to your PocketMine server\u003cbr\u003e\n\n\u003e [!NOTE]\n\u003e This repo is no longer required as Fireworks are [now implemented in PMMP](https://github.com/pmmp/PocketMine-MP/pull/5455).\n\nDownload the compiled `.phar` format of Fireworks from the [Poggit CI](https://poggit.pmmp.io/ci/BlockHorizons/Fireworks).\n## API\n### Adding firework items to a player's inventory\nGiving players fireworks is easy as pie. Here are some examples (where `$player` is a `\\pocketmine\\Player` object):\n- **Base firework**\n```php\n/** @var Fireworks $fw */\n$fw = ItemFactory::get(Item::FIREWORKS);\n$player-\u003egetInventory()-\u003eaddItem($fw);\n```\n- **Sphere firework with color fade from blue to cyan**\n```php\n/** @var Fireworks $fw */\n$fw = ItemFactory::get(Item::FIREWORKS);\n\n// addExplosion Parameters:\n// int $type: Type of explosion, 0 - 4, see Fireworks::TYPE_* constants\n// string $color: Color of explosion, see Fireworks::COLOR_* constants\n// string $fade = \"\": Color to fade to, none if an empty string is passed\n// bool $flicker = false: If the particles should flicker\n// bool $trail = false: If the particles leave a trail behind\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_BLUE, Fireworks::COLOR_DARK_AQUA, false, false);\n\n$player-\u003egetInventory()-\u003eaddItem($fw);\n```\n- **Green creeper firework, flying higher**\n```php\n/** @var Fireworks $fw */\n$fw = ItemFactory::get(Item::FIREWORKS);\n$fw-\u003eaddExplosion(Fireworks::TYPE_CREEPER_HEAD, Fireworks::COLOR_GREEN, \"\", false, false);\n$fw-\u003esetFlightDuration(2);\n$player-\u003egetInventory()-\u003eaddItem($fw);\n```\n- **High flying flashing star firework with trail**\n```php\n/** @var Fireworks $fw */\n$fw = ItemFactory::get(Item::FIREWORKS);\n$fw-\u003eaddExplosion(Fireworks::TYPE_STAR, Fireworks::COLOR_YELLOW, \"\", true, true);\n$fw-\u003esetFlightDuration(3);\n$player-\u003egetInventory()-\u003eaddItem($fw);\n```\n- **All-colored sphere firework with trail**\n```php\n/** @var Fireworks $fw */\n$fw = ItemFactory::get(Item::FIREWORKS);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_BLACK, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_RED, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_DARK_GREEN, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_BROWN, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_BLUE, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_DARK_PURPLE, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_DARK_AQUA, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_GRAY, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_DARK_GRAY, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_PINK, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_GREEN, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_YELLOW, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_LIGHT_AQUA, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_DARK_PINK, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_GOLD, \"\", false, true);\n$fw-\u003eaddExplosion(Fireworks::TYPE_SMALL_SPHERE, Fireworks::COLOR_WHITE, \"\", false, true);\n$player-\u003egetInventory()-\u003eaddItem($fw);\n```\n### Launching fireworks\nFireworks can be launched after you created the firework item.\nThis example spawns a green creeper firework at the default world's spawn\n```php\n// Create the type of firework item to be launched\n/** @var Fireworks $fw */\n$fw = ItemFactory::get(Item::FIREWORKS);\n$fw-\u003eaddExplosion(Fireworks::TYPE_CREEPER_HEAD, Fireworks::COLOR_GREEN, \"\", false, false);\n$fw-\u003esetFlightDuration(2);\n\n// Use whatever level you'd like here. Must be loaded\n$level = Server::getInstance()-\u003egetDefaultLevel();\n// Choose some coordinates\n$vector3 = $level-\u003egetSpawnLocation()-\u003eadd(0.5, 1, 0.5);\n// Create the NBT data\n$nbt = FireworksRocket::createBaseNBT($vector3, new Vector3(0.001, 0.05, 0.001), lcg_value() * 360, 90);\n// Construct and spawn\n$entity = FireworksRocket::createEntity(\"FireworksRocket\", $level, $nbt, $fw);\nif ($entity instanceof FireworksRocket) {\n    $entity-\u003espawnToAll();\n}\n```\n","funding_links":["https://opencollective.com/blockhorizons"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockhorizons%2Ffireworks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockhorizons%2Ffireworks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockhorizons%2Ffireworks/lists"}