mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-25 04:44:03 +00:00
level/light: populate missing return type information
This commit is contained in:
parent
facca13139
commit
31e8efa6d1
@ -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)];
|
||||
|
Loading…
x
Reference in New Issue
Block a user