mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Chunks no longer contain their own coordinates
This commit is contained in:
@ -32,13 +32,23 @@ use pocketmine\world\World;
|
||||
abstract class ChunkEvent extends WorldEvent{
|
||||
/** @var Chunk */
|
||||
private $chunk;
|
||||
/** @var int */
|
||||
private $chunkX;
|
||||
/** @var int */
|
||||
private $chunkZ;
|
||||
|
||||
public function __construct(World $world, Chunk $chunk){
|
||||
public function __construct(World $world, int $chunkX, int $chunkZ, Chunk $chunk){
|
||||
parent::__construct($world);
|
||||
$this->chunk = $chunk;
|
||||
$this->chunkX = $chunkX;
|
||||
$this->chunkZ = $chunkZ;
|
||||
}
|
||||
|
||||
public function getChunk() : Chunk{
|
||||
return $this->chunk;
|
||||
}
|
||||
|
||||
public function getChunkX() : int{ return $this->chunkX; }
|
||||
|
||||
public function getChunkZ() : int{ return $this->chunkZ; }
|
||||
}
|
||||
|
@ -33,8 +33,8 @@ class ChunkLoadEvent extends ChunkEvent{
|
||||
/** @var bool */
|
||||
private $newChunk;
|
||||
|
||||
public function __construct(World $world, Chunk $chunk, bool $newChunk){
|
||||
parent::__construct($world, $chunk);
|
||||
public function __construct(World $world, int $chunkX, int $chunkZ, Chunk $chunk, bool $newChunk){
|
||||
parent::__construct($world, $chunkX, $chunkZ, $chunk);
|
||||
$this->newChunk = $newChunk;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user