Skip to content

Jigsaw 5.47.0 ​

class · pocketmine\block\Jigsaw · source

Extends Opaque
Implements AnyFacing

Jigsaw block (https://minecraft.wiki/w/Jigsaw_Block). Holds the connection data of a structure piece in its block entity (TileJigsaw); the vanilla generator reads that data from the templates, so in the world it is only a data holder that operators in creative mode can edit. The front faces away from the clicked block; the rotation (0-3) turns the block around its front: for a front facing up or down it is the direction of the top (Jigsaw::TOP_DIRECTIONS). Never drops.

Constants ​

MAX_ROTATION ​

php
public const MAX_ROTATION = 3

TOP_DIRECTIONS ​

php
public const TOP_DIRECTIONS = [\pocketmine\math\Facing::NORTH, \pocketmine\math\Facing::EAST, \pocketmine\math\Facing::SOUTH, \pocketmine\math\Facing::WEST]

Direction of the top of a jigsaw facing up or down, by rotation

Properties ​

$rotation protected ​

php
protected int $rotation

Methods ​

describeBlockOnlyState() protected ​

php
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : void

getDropsForCompatibleTool() ​

php
public function getDropsForCompatibleTool(\pocketmine\item\Item $item) : array

getRotation() ​

php
public function getRotation() : int

isAffectedBySilkTouch() ​

php
public function isAffectedBySilkTouch() : bool

onInteract() ​

php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

place() ​

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) : bool

setRotation() ​

php
public function setRotation(int $rotation) : self

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