mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
New generic in-memory chunk format, fixed 0.17.0.1 chunk loading
Terrible performance, needs profiling. TODO: fix this.
This commit is contained in:
@ -24,22 +24,22 @@
|
||||
*/
|
||||
namespace pocketmine\event\level;
|
||||
|
||||
use pocketmine\level\format\FullChunk;
|
||||
use pocketmine\level\format\Chunk;
|
||||
|
||||
abstract class ChunkEvent extends LevelEvent{
|
||||
/** @var FullChunk */
|
||||
/** @var Chunk */
|
||||
private $chunk;
|
||||
|
||||
/**
|
||||
* @param FullChunk $chunk
|
||||
* @param Chunk $chunk
|
||||
*/
|
||||
public function __construct(FullChunk $chunk){
|
||||
public function __construct(Chunk $chunk){
|
||||
parent::__construct($chunk->getProvider()->getLevel());
|
||||
$this->chunk = $chunk;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FullChunk
|
||||
* @return Chunk
|
||||
*/
|
||||
public function getChunk(){
|
||||
return $this->chunk;
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
namespace pocketmine\event\level;
|
||||
|
||||
use pocketmine\level\format\FullChunk;
|
||||
use pocketmine\level\format\Chunk;
|
||||
|
||||
/**
|
||||
* Called when a Chunk is loaded
|
||||
@ -31,7 +31,7 @@ class ChunkLoadEvent extends ChunkEvent{
|
||||
|
||||
private $newChunk;
|
||||
|
||||
public function __construct(FullChunk $chunk, $newChunk){
|
||||
public function __construct(Chunk $chunk, $newChunk){
|
||||
parent::__construct($chunk);
|
||||
$this->newChunk = (bool) $newChunk;
|
||||
}
|
||||
|
Reference in New Issue
Block a user