Skip to content

Spawnable ​

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

Extends Tile

Methods ​

addAdditionalSpawnData() protected ​

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

An extension to getSpawnCompound() for further modifying the generic tile NBT.

clearSpawnCompoundCache() ​

php
public function clearSpawnCompoundCache() : void

getRenderUpdateBugWorkaroundStateProperties() ​

php
public function getRenderUpdateBugWorkaroundStateProperties(\pocketmine\block\Block $block) : array

The Bedrock client won't re-render a block if the block's state properties didn't change. This is a problem when the tile may affect the block's appearance. For example, a cauldron's liquid changes colour based on the dye inside.

This is worked around in vanilla by modifying one of the block's state properties to a different value, and then changing it back again. Since we don't want to litter core implementation with hacks like this, we brush it under the rug into Tile.

getSerializedSpawnCompound() ​

php
final public function getSerializedSpawnCompound() : \pocketmine\network\mcpe\protocol\types\CacheableNbt

Returns encoded NBT (varint, little-endian) used to spawn this tile to clients. Uses cache where possible, populates cache if it is null.

getSpawnCompound() ​

php
final public function getSpawnCompound() : \pocketmine\nbt\tag\CompoundTag

isDirty() ​

php
public function isDirty() : bool

Deprecated

Deprecated.

setDirty() ​

php
public function setDirty(bool $dirty = true) : void

Deprecated

Deprecated.

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