StructureBlock 5.47.0
Extends Opaque
Structure block (https://minecraft.wiki/w/Structure_Block). The mode is the block state; the other settings live in the block entity (TileStructureBlock), which saves and loads the structure templates of the world. Only operators in creative mode can place it or open its screen. In save and load mode, a redstone signal turning on saves or loads the structure. Never drops.
Properties
$mode protected
php
protected \pocketmine\block\utils\StructureBlockType $modeMethods
describeBlockOnlyState() protected
php
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : voidgetDropsForCompatibleTool()
php
public function getDropsForCompatibleTool(\pocketmine\item\Item $item) : arraygetMode()
php
public function getMode() : \pocketmine\block\utils\StructureBlockTypeisAffectedBySilkTouch()
php
public function isAffectedBySilkTouch() : 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() : voidPlaces the next part of a structure being loaded over several ticks.
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) : boolsetMode()
php
public function setMode(\pocketmine\block\utils\StructureBlockType $mode) : selfwriteStateToWorld()
php
public function writeStateToWorld() : void