Barrel
Extends Spawnable
Implements ComparatorReadableContainer, Nameable
Properties
$inventory protected
php
protected \pocketmine\block\inventory\BarrelInventory $inventoryMethods
__construct()
php
public function __construct(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos)close()
php
public function close() : voidgetDefaultName()
php
public function getDefaultName() : stringgetInventory()
php
public function getInventory() : \pocketmine\block\inventory\BarrelInventoryReturns the inventory, filling it from its loot table first if it has one (see LootTableContainerTrait).
getRealInventory()
php
public function getRealInventory() : \pocketmine\block\inventory\BarrelInventoryonBlockDestroyedHook() 5.46.0 protected
php
protected function onBlockDestroyedHook() : voidreadSaveData()
php
public function readSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidwriteSaveData() protected
php
protected function writeSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void