diff --git a/src/pocketmine/level/light/LightUpdate.php b/src/pocketmine/level/light/LightUpdate.php index a2c4bc45e1..3fb90130c0 100644 --- a/src/pocketmine/level/light/LightUpdate.php +++ b/src/pocketmine/level/light/LightUpdate.php @@ -59,8 +59,24 @@ abstract class LightUpdate{ abstract protected function getLight(int $x, int $y, int $z) : int; + /** + * @param int $x + * @param int $y + * @param int $z + * @param int $level + * + * @return void + */ abstract protected function setLight(int $x, int $y, int $z, int $level); + /** + * @param int $x + * @param int $y + * @param int $z + * @param int $newLevel + * + * @return void + */ public function setAndUpdateLight(int $x, int $y, int $z, int $newLevel){ $this->updateNodes[Level::blockHash($x, $y, $z)] = [$x, $y, $z, $newLevel]; } @@ -84,6 +100,9 @@ abstract class LightUpdate{ } } + /** + * @return void + */ public function execute(){ $this->prepareNodes(); @@ -137,6 +156,14 @@ abstract class LightUpdate{ } } + /** + * @param int $x + * @param int $y + * @param int $z + * @param int $oldAdjacentLevel + * + * @return void + */ protected function computeRemoveLight(int $x, int $y, int $z, int $oldAdjacentLevel){ $current = $this->getLight($x, $y, $z); @@ -157,6 +184,14 @@ abstract class LightUpdate{ } } + /** + * @param int $x + * @param int $y + * @param int $z + * @param int $newAdjacentLevel + * + * @return void + */ protected function computeSpreadLight(int $x, int $y, int $z, int $newAdjacentLevel){ $current = $this->getLight($x, $y, $z); $potentialLight = $newAdjacentLevel - BlockFactory::$lightFilter[$this->subChunkHandler->currentSubChunk->getBlockId($x & 0x0f, $y & 0x0f, $z & 0x0f)];