mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
All BlockInventory descendents now have a Position as holder
this allows multiple problems to be solved: 1) Cycle between tile and inventory is now removed. 2) BlockInventory now provides a consistent API for plugins to get the block holding an inventory.
This commit is contained in:
@ -56,14 +56,13 @@ class Furnace extends Spawnable implements Container, Nameable{
|
||||
private $maxFuelTime = 0;
|
||||
|
||||
public function __construct(World $world, Vector3 $pos){
|
||||
parent::__construct($world, $pos);
|
||||
$this->inventory = new FurnaceInventory($this);
|
||||
$this->inventory->addChangeListeners(CallbackInventoryChangeListener::onAnyChange(
|
||||
function(Inventory $unused) : void{
|
||||
$this->world->scheduleDelayedBlockUpdate($this->asVector3(), 1);
|
||||
})
|
||||
);
|
||||
|
||||
parent::__construct($world, $pos);
|
||||
}
|
||||
|
||||
public function readSaveData(CompoundTag $nbt) : void{
|
||||
|
Reference in New Issue
Block a user