Chest
Extends Spawnable
Implements ComparatorReadableContainer, Nameable
Constants
TAG_PAIRX
php
public const TAG_PAIRX = "pairx"TAG_PAIRZ
php
public const TAG_PAIRZ = "pairz"TAG_PAIR_LEAD
php
public const TAG_PAIR_LEAD = "pairlead"Properties
$doubleInventory protected
php
protected ?\pocketmine\block\inventory\DoubleChestInventory $doubleInventory$inventory protected
php
protected \pocketmine\block\inventory\ChestInventory $inventoryMethods
__construct()
php
public function __construct(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos)addAdditionalSpawnData() protected
php
protected function addAdditionalSpawnData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidcheckPairing() protected
php
protected function checkPairing() : voidclose()
php
public function close() : voidgetCleanedNBT()
php
public function getCleanedNBT() : ?\pocketmine\nbt\tag\CompoundTaggetDefaultName()
php
public function getDefaultName() : stringgetInventory()
php
public function getInventory() : \pocketmine\block\inventory\ChestInventory|\pocketmine\block\inventory\DoubleChestInventoryReturns the inventory of the chest (both halves for a double chest), filling it from its loot table first if it has one (see LootTableContainerTrait).
getPair()
php
public function getPair() : ?\pocketmine\block\tile\ChestgetRealInventory()
php
public function getRealInventory() : \pocketmine\block\inventory\ChestInventoryisPaired()
php
public function isPaired() : boolonBlockDestroyedHook() protected
php
protected function onBlockDestroyedHook() : voidpairWith()
php
public function pairWith(\pocketmine\block\tile\Chest $tile) : boolreadSaveData()
php
public function readSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidunpair()
php
public function unpair() : boolwriteSaveData() protected
php
protected function writeSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void