Skip to content

CartographyMapRecipe 5.46.0 ​

final class · pocketmine\crafting\CartographyMapRecipe · source

Implements CraftingRecipe

The map operations of the cartography table, which the client knows as hardcoded multi recipes (UUIDs from BedrockData special_hardcoded.json; GeyserMC sends the same four so that its players can use the table):

  • extending: map + paper = the map zoomed out one step (a new, blank map with the next scale)
  • cloning: map + empty map = two copies of the map
  • upgrading: map + compass = the map with player markers (locator map)
  • locking: map + glass pane = a locked copy that no longer changes

They only apply to the cartography table; the crafting grid never matches them.

Constants ​

CLONING ​

php
public const CLONING = "442d85ed-8272-4543-a6f1-418f90ded05d"

EXTENDING ​

php
public const EXTENDING = "8b36268c-1829-483c-a0f1-993b7156a8f2"

LOCKING ​

php
public const LOCKING = "602234e4-cac1-4353-8bb7-b1ebff70024b"

UPGRADING ​

php
public const UPGRADING = "98c84b38-1085-46bd-b1ce-dd38c159e6cc"

Methods ​

__construct() ​

php
public function __construct(string $uuid)

all() ​

php
public static function all() : array

createsNewMap() ​

php
public function createsNewMap() : bool

Returns whether the result is a new map (with a new map ID) rather than a copy of the input map.

getIngredientList() ​

php
public function getIngredientList() : array

getResultFor() ​

php
public function getResultFor(\pocketmine\item\Item $input, \pocketmine\item\Item $additional, int $newMapId = 0) : ?\pocketmine\item\Item

Returns the result of this operation for the items in the input and additional slots of the cartography table, or null if they don't fit. For operations that create a new map, the result gets $newMapId (the map data itself is created when the operation is done).

getResultsFor() ​

php
public function getResultsFor(\pocketmine\crafting\CraftingGrid $grid) : array

getUuid() ​

php
public function getUuid() : string

UUID the client uses for this multi recipe

matchesCraftingGrid() ​

php
public function matchesCraftingGrid(\pocketmine\crafting\CraftingGrid $grid) : bool

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.