Skip to content

FireworkRecipe 5.47.0 ​

final class · pocketmine\crafting\FireworkRecipe · source

Extends MultiCraftingRecipe

Vanilla's hardcoded firework crafting (one client multi recipe covering the three Java recipes):

  • rocket: 1 paper + 1-3 gunpowder (flight duration) + any number of firework stars -> 3 rockets
  • star: 1 gunpowder + 1-8 dyes + at most one shape item (fire charge = large ball, gold nugget = star, any head = creeper, feather = burst), at most one diamond (trail) and one glowstone dust (twinkle)
  • fade: 1 firework star + 1-8 dyes -> the same star with those dyes as fade colours Grid positions don't matter.

Constants ​

MULTI_RECIPE_UUID ​

php
public const MULTI_RECIPE_UUID = "00000000-0000-0000-0000-000000000002"

UUID the client uses for the firework multi recipe (BedrockData special_hardcoded.json)

Methods ​

computeResult() ​

php
public static function computeResult(array $items) : ?\pocketmine\item\Item

Returns the crafted item for the given grid contents (empty slots excluded), or null if they make no firework recipe.

computeResults() protected ​

php
protected function computeResults(\pocketmine\crafting\CraftingGrid $grid) : ?array

getIngredientList() ​

php
public function getIngredientList() : array

getMultiRecipeUuid() ​

php
public function getMultiRecipeUuid() : string

VanillaMine is a fork of PocketMine-MP. Not affiliated with the PMMP team or Mojang.