Skip to content

Tile ​

abstract class · pocketmine\block\tile\Tile · source

Constants ​

TAG_ID ​

php
public const TAG_ID = "id"

TAG_X ​

php
public const TAG_X = "x"

TAG_Y ​

php
public const TAG_Y = "y"

TAG_Z ​

php
public const TAG_Z = "z"

Properties ​

$closed ​

php
public bool $closed

$position protected ​

php
protected \pocketmine\world\Position $position

$timings protected ​

php
protected \pocketmine\timings\TimingsHandler $timings

Methods ​

__construct() ​

php
public function __construct(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos)

__destruct() ​

php
public function __destruct()

close() ​

php
public function close() : void

getBlock() ​

php
public function getBlock() : \pocketmine\block\Block

getCleanedNBT() ​

php
public function getCleanedNBT() : ?\pocketmine\nbt\tag\CompoundTag

getPosition() ​

php
public function getPosition() : \pocketmine\world\Position

isClosed() ​

php
public function isClosed() : bool

onBlockDestroyed() ​

php
final public function onBlockDestroyed() : void

Called when the tile's block is destroyed.

onBlockDestroyedHook() protected ​

php
protected function onBlockDestroyedHook() : void

Override this method to do actions you need to do when this tile is destroyed due to block being broken.

saveNBT() ​

php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTag

writeSaveData() protected ​

php
abstract protected function writeSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void

Writes additional save data to a CompoundTag, not including generic things like ID and coordinates.

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