mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
First look: Split up Inventory & InventoryWindow
this unblocks a variety of changes, such as positionless tiles, enhanced APIs on Blocks for inventories, and also eliminates a bunch of cyclic references within the core code. linked to #5033
This commit is contained in:
@ -145,7 +145,7 @@ abstract class Living extends Entity{
|
||||
$this->effectManager->getEffectAddHooks()->add(function() : void{ $this->networkPropertiesDirty = true; });
|
||||
$this->effectManager->getEffectRemoveHooks()->add(function() : void{ $this->networkPropertiesDirty = true; });
|
||||
|
||||
$this->armorInventory = new ArmorInventory($this);
|
||||
$this->armorInventory = new ArmorInventory();
|
||||
//TODO: load/save armor inventory contents
|
||||
$this->armorInventory->getListeners()->add(CallbackInventoryListener::onAnyChange(fn() => NetworkBroadcastUtils::broadcastEntityEvent(
|
||||
$this->getViewers(),
|
||||
@ -928,7 +928,6 @@ abstract class Living extends Entity{
|
||||
|
||||
protected function destroyCycles() : void{
|
||||
unset(
|
||||
$this->armorInventory,
|
||||
$this->effectManager
|
||||
);
|
||||
parent::destroyCycles();
|
||||
|
Reference in New Issue
Block a user