mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Tile: make ContainerTrait and NameableTrait non-dependent on context-retained NBT
This commit is contained in:
@ -59,7 +59,8 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
|
||||
parent::__construct($level, $nbt);
|
||||
|
||||
$this->inventory = new ChestInventory($this);
|
||||
$this->loadItems();
|
||||
$this->loadItems($this->namedtag);
|
||||
$this->loadName($this->namedtag);
|
||||
}
|
||||
|
||||
public function close() : void{
|
||||
@ -86,7 +87,8 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
|
||||
}else{
|
||||
$this->namedtag->removeTag(self::TAG_PAIRX, self::TAG_PAIRZ);
|
||||
}
|
||||
$this->saveItems();
|
||||
$this->saveItems($this->namedtag);
|
||||
$this->saveName($this->namedtag);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user