38 parent::__construct($world, $pos);
42 public function readSaveData(
CompoundTag $nbt) :
void{
43 $this->loadName($nbt);
44 $this->loadItems($nbt);
48 $this->saveName($nbt);
49 $this->saveItems($nbt);
52 public function close() : void{
54 $this->inventory->removeAllViewers();
59 public function getInventory() : BarrelInventory{
60 return $this->inventory;
63 public function getRealInventory() : BarrelInventory{
64 return $this->inventory;
67 public function getDefaultName() : string{