Skip to content

Barrel ​

class · pocketmine\block\tile\Barrel · source

Extends Spawnable
Implements ComparatorReadableContainer, Nameable

Properties ​

$inventory protected ​

php
protected \pocketmine\block\inventory\BarrelInventory $inventory

Methods ​

__construct() ​

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

close() ​

php
public function close() : void

getDefaultName() ​

php
public function getDefaultName() : string

getInventory() ​

php
public function getInventory() : \pocketmine\block\inventory\BarrelInventory

Returns the inventory, filling it from its loot table first if it has one (see LootTableContainerTrait).

getRealInventory() ​

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

onBlockDestroyedHook() 5.46.0 protected ​

php
protected function onBlockDestroyedHook() : void

readSaveData() ​

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

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.