mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Remove $create parameter from ChunkManager::getChunk()
this restores SimpleChunkManager's behaviour to PM3, removing the need for GeneratorChunkManager (although I'm dubious whether SubChunkExplorer makes any sense in there any more now that we have morton in the mix).
This commit is contained in:
@ -61,7 +61,7 @@ class SkyLightUpdate extends LightUpdate{
|
||||
}
|
||||
|
||||
public function recalculateNode(int $x, int $y, int $z) : void{
|
||||
if($this->subChunkExplorer->moveTo($x, $y, $z, false) === SubChunkExplorerStatus::INVALID){
|
||||
if($this->subChunkExplorer->moveTo($x, $y, $z) === SubChunkExplorerStatus::INVALID){
|
||||
return;
|
||||
}
|
||||
$chunk = $this->subChunkExplorer->currentChunk;
|
||||
@ -98,7 +98,7 @@ class SkyLightUpdate extends LightUpdate{
|
||||
}
|
||||
|
||||
public function recalculateChunk(int $chunkX, int $chunkZ) : int{
|
||||
if($this->subChunkExplorer->moveToChunk($chunkX, 0, $chunkZ, false) === SubChunkExplorerStatus::INVALID){
|
||||
if($this->subChunkExplorer->moveToChunk($chunkX, 0, $chunkZ) === SubChunkExplorerStatus::INVALID){
|
||||
throw new \InvalidArgumentException("Chunk $chunkX $chunkZ does not exist");
|
||||
}
|
||||
$chunk = $this->subChunkExplorer->currentChunk;
|
||||
@ -151,7 +151,7 @@ class SkyLightUpdate extends LightUpdate{
|
||||
$lightSources++;
|
||||
}
|
||||
for($y = $nodeColumnEnd + 1, $yMax = $lowestClearSubChunk * 16; $y < $yMax; $y++){
|
||||
if($this->subChunkExplorer->moveTo($x + $baseX, $y, $z + $baseZ, false) !== SubChunkExplorerStatus::INVALID){
|
||||
if($this->subChunkExplorer->moveTo($x + $baseX, $y, $z + $baseZ) !== SubChunkExplorerStatus::INVALID){
|
||||
$this->getCurrentLightArray()->set($x, $y & 0xf, $z, 15);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user