mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Inventory: Removed need for Inventory to have an InventoryHolder
Inventory holders are now freed from BaseInventory. They are now declared by subclasses by convention, but are not required in most cases. Ideally, this would be followed by the removal of the need for inventories to know their holders at all. They should just be simple containers of items. This fixes #1560 by removing FakeBlockMenu.
This commit is contained in:
@ -37,7 +37,7 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
|
||||
$this->left = $left->getRealInventory();
|
||||
$this->right = $right->getRealInventory();
|
||||
$items = array_merge($this->left->getContents(), $this->right->getContents());
|
||||
BaseInventory::__construct($this, $items);
|
||||
BaseInventory::__construct($items);
|
||||
}
|
||||
|
||||
public function getName() : string{
|
||||
|
Reference in New Issue
Block a user