Crafter 5.46.0
Extends Opaque
Crafter (Minecraft Wiki "Crafter"): on a rising redstone edge, waits 4 game ticks, then crafts one recipe from its 3x3 grid and ejects the result from its front, into a container if there is one (whatever does not fit is dropped), followed by the leftovers of the ingredients (empty buckets and bottles).
Constants
CRAFTING_STATE_TICKS
php
public const CRAFTING_STATE_TICKS = 6How long the "crafting" state (open mouth, glowing top) lasts after a craft (Java crafting_ticks_remaining).
CRAFT_DELAY_TICKS
php
public const CRAFT_DELAY_TICKS = 4Properties
$crafting protected
php
protected bool $crafting$orientation protected
php
protected \pocketmine\block\utils\CrafterOrientation $orientation$triggered protected
php
protected bool $triggeredMethods
craft()
php
public function craft(\pocketmine\block\tile\Crafter $tile) : boolCrafts once if the grid holds a valid recipe. Returns whether something was crafted.
describeBlockOnlyState() protected
php
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : voidgetCraftingRemainder()
php
public static function getCraftingRemainder(\pocketmine\item\Item $item) : ?\pocketmine\item\ItemReturns the item left behind by an ingredient when crafting (vanilla "crafting remainder"), or null.
getOrientation()
php
public function getOrientation() : \pocketmine\block\utils\CrafterOrientationisCrafting()
php
public function isCrafting() : boolisTriggered()
php
public function isTriggered() : boolonInteract()
php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonNearbyBlockChange()
php
public function onNearbyBlockChange() : voidonScheduledUpdate()
php
public function onScheduledUpdate() : voidplace()
php
public function place(\pocketmine\world\BlockTransaction $tx, \pocketmine\item\Item $item, \pocketmine\block\Block $blockReplace, \pocketmine\block\Block $blockClicked, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null) : boolsetCrafting()
php
public function setCrafting(bool $crafting) : selfsetOrientation()
php
public function setOrientation(\pocketmine\block\utils\CrafterOrientation $orientation) : selfsetTriggered()
php
public function setTriggered(bool $triggered) : self