mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Removed entanglement between chunks and providers. WARNING: BREAKING API CHANGES.
- All entity and tile constructors now require a \pocketmine\level\Level instead of a \pocketmine\level\format\Chunk. - Chunk->getProvider() and Chunk->setProvider() have been removed. - Chunk::__construct() has had the $provider parameter removed. - Chunk->unload() has had the unused $save parameter removed. - ChunkEvents now take a Level parameter instead of going through the Chunk API bump to 3.0.0-ALPHA4
This commit is contained in:
@ -25,7 +25,7 @@ use pocketmine\inventory\ChestInventory;
|
||||
use pocketmine\inventory\DoubleChestInventory;
|
||||
use pocketmine\inventory\InventoryHolder;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\level\format\Chunk;
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\nbt\NBT;
|
||||
use pocketmine\nbt\tag\CompoundTag;
|
||||
@ -40,8 +40,8 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{
|
||||
/** @var DoubleChestInventory */
|
||||
protected $doubleInventory = null;
|
||||
|
||||
public function __construct(Chunk $chunk, CompoundTag $nbt){
|
||||
parent::__construct($chunk, $nbt);
|
||||
public function __construct(Level $level, CompoundTag $nbt){
|
||||
parent::__construct($level, $nbt);
|
||||
$this->inventory = new ChestInventory($this);
|
||||
|
||||
if(!isset($this->namedtag->Items) or !($this->namedtag->Items instanceof ListTag)){
|
||||
|
Reference in New Issue
Block a user