Skip to content

StructureBlock 5.47.0 ​

class · pocketmine\block\StructureBlock · source

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 $mode

Methods ​

describeBlockOnlyState() protected ​

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

getDropsForCompatibleTool() ​

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

getMode() ​

php
public function getMode() : \pocketmine\block\utils\StructureBlockType

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

onNearbyBlockChange() ​

php
public function onNearbyBlockChange() : void

onScheduledUpdate() ​

php
public function onScheduledUpdate() : void

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

setMode() ​

php
public function setMode(\pocketmine\block\utils\StructureBlockType $mode) : self

writeStateToWorld() ​

php
public function writeStateToWorld() : void

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