mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
* Implemented InventoryEventProcessor, fixes #1986 Event processors can now be registered and unregistered at will. Entity inventory/armor change events are now handled by event processors instead of the inventories themselves, which allows enabling/disabling the calling of these events at will. This now avoids stupid things happening when initializing inventory contents, since the callers for those events are now registered _after_ the contents are initialized.
This commit is contained in:
@ -102,10 +102,4 @@ class FurnaceInventory extends ContainerInventory{
|
||||
public function setSmelting(Item $item) : bool{
|
||||
return $this->setItem(0, $item);
|
||||
}
|
||||
|
||||
public function onSlotChange(int $index, Item $before, bool $send) : void{
|
||||
parent::onSlotChange($index, $before, $send);
|
||||
|
||||
$this->getHolder()->scheduleUpdate();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user