Skip to content

Chest ​

class · pocketmine\block\tile\Chest · source

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

Methods ​

__construct() ​

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

addAdditionalSpawnData() protected ​

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

checkPairing() protected ​

php
protected function checkPairing() : void

close() ​

php
public function close() : void

getCleanedNBT() ​

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

getDefaultName() ​

php
public function getDefaultName() : string

getInventory() ​

php
public function getInventory() : \pocketmine\block\inventory\ChestInventory|\pocketmine\block\inventory\DoubleChestInventory

Returns 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\Chest

getRealInventory() ​

php
public function getRealInventory() : \pocketmine\block\inventory\ChestInventory

isPaired() ​

php
public function isPaired() : bool

onBlockDestroyedHook() protected ​

php
protected function onBlockDestroyedHook() : void

pairWith() ​

php
public function pairWith(\pocketmine\block\tile\Chest $tile) : bool

readSaveData() ​

php
public function readSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void

unpair() ​

php
public function unpair() : bool

writeSaveData() protected ​

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

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