Spawnable
Extends Tile
Methods
addAdditionalSpawnData() protected
php
abstract protected function addAdditionalSpawnData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidAn extension to getSpawnCompound() for further modifying the generic tile NBT.
clearSpawnCompoundCache()
php
public function clearSpawnCompoundCache() : voidgetRenderUpdateBugWorkaroundStateProperties()
php
public function getRenderUpdateBugWorkaroundStateProperties(\pocketmine\block\Block $block) : arrayThe 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\CacheableNbtReturns 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\CompoundTagisDirty()
php
public function isDirty() : boolDeprecated
Deprecated.
setDirty()
php
public function setDirty(bool $dirty = true) : voidDeprecated
Deprecated.
