mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +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:
@ -75,7 +75,7 @@ class GenerationTask extends AsyncTask{
|
||||
return;
|
||||
}
|
||||
/** @var Chunk $chunk */
|
||||
$chunk = Chunk::fastDeserialize($this->chunk, $level->getProvider());
|
||||
$chunk = Chunk::fastDeserialize($this->chunk);
|
||||
if($chunk === null){
|
||||
//TODO error
|
||||
return;
|
||||
|
@ -55,7 +55,7 @@ class LightPopulationTask extends AsyncTask{
|
||||
$level = $server->getLevel($this->levelId);
|
||||
if($level !== null){
|
||||
/** @var Chunk $chunk */
|
||||
$chunk = Chunk::fastDeserialize($this->chunk, $level->getProvider());
|
||||
$chunk = Chunk::fastDeserialize($this->chunk);
|
||||
if($chunk === null){
|
||||
//TODO error
|
||||
return;
|
||||
|
@ -152,7 +152,7 @@ class PopulationTask extends AsyncTask{
|
||||
return;
|
||||
}
|
||||
|
||||
$chunk = Chunk::fastDeserialize($this->chunk, $level->getProvider());
|
||||
$chunk = Chunk::fastDeserialize($this->chunk);
|
||||
|
||||
if($chunk === null){
|
||||
//TODO error
|
||||
@ -165,7 +165,7 @@ class PopulationTask extends AsyncTask{
|
||||
}
|
||||
$c = $this->{"chunk$i"};
|
||||
if($c !== null){
|
||||
$c = Chunk::fastDeserialize($c, $level->getProvider());
|
||||
$c = Chunk::fastDeserialize($c);
|
||||
$level->generateChunkCallback($c->getX(), $c->getZ(), $c);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user