mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Tile: make ContainerTrait and NameableTrait non-dependent on context-retained NBT
This commit is contained in:
@ -23,9 +23,22 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\tile;
|
||||
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\nbt\tag\CompoundTag;
|
||||
|
||||
class EnchantTable extends Spawnable implements Nameable{
|
||||
use NameableTrait;
|
||||
|
||||
public function __construct(Level $level, CompoundTag $nbt){
|
||||
$this->loadName($nbt);
|
||||
parent::__construct($level, $nbt);
|
||||
}
|
||||
|
||||
public function saveNBT() : void{
|
||||
parent::saveNBT();
|
||||
$this->saveName($this->namedtag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
Reference in New Issue
Block a user