Do not create chunks during light propagation/removal

this used to be necessary to trigger subchunk creation so that light arrays would be available for use. With 02ff8d671b93ec5911576643e9b03f2049f31c81, this is no longer necessary.
This commit is contained in:
Dylan K. Taylor 2020-09-05 22:22:19 +01:00
parent 6054104ecb
commit 15299735e9

View File

@ -145,7 +145,7 @@ abstract class LightUpdate{
];
foreach($points as list($cx, $cy, $cz)){
if($this->subChunkHandler->moveTo($cx, $cy, $cz, true)){
if($this->subChunkHandler->moveTo($cx, $cy, $cz, false)){
$this->computeRemoveLight($cx, $cy, $cz, $oldAdjacentLight);
}elseif($this->getEffectiveLight($cx, $cy, $cz) > 0 and !isset($this->spreadVisited[$index = World::blockHash($cx, $cy, $cz)])){
$this->spreadVisited[$index] = true;
@ -174,7 +174,7 @@ abstract class LightUpdate{
];
foreach($points as list($cx, $cy, $cz)){
if($this->subChunkHandler->moveTo($cx, $cy, $cz, true)){
if($this->subChunkHandler->moveTo($cx, $cy, $cz, false)){
$this->computeSpreadLight($cx, $cy, $cz, $newAdjacentLight);
}
}