ChunkManager: drop light-related methods

these were added in 2017 with the intent of async'ifying light updates. However, light updates now use an optimized code path which bypasses these functions completely, rendering them useless.
This commit is contained in:
Dylan K. Taylor 2019-06-27 16:56:46 +01:00
parent 6da2bd4bb3
commit 1749b57a83
2 changed files with 0 additions and 70 deletions

View File

@ -51,48 +51,6 @@ interface ChunkManager{
*/
public function setBlockAt(int $x, int $y, int $z, Block $block) : bool;
/**
* Returns the raw block light level
*
* @param int $x
* @param int $y
* @param int $z
*
* @return int
*/
public function getBlockLightAt(int $x, int $y, int $z) : int;
/**
* Sets the raw block light level
*
* @param int $x
* @param int $y
* @param int $z
* @param int $level
*/
public function setBlockLightAt(int $x, int $y, int $z, int $level) : void;
/**
* Returns the highest amount of sky light can reach the specified coordinates.
*
* @param int $x
* @param int $y
* @param int $z
*
* @return int
*/
public function getBlockSkyLightAt(int $x, int $y, int $z) : int;
/**
* Sets the raw block sky light level.
*
* @param int $x
* @param int $y
* @param int $z
* @param int $level
*/
public function setBlockSkyLightAt(int $x, int $y, int $z, int $level) : void;
/**
* @param int $chunkX
* @param int $chunkZ

View File

@ -66,34 +66,6 @@ class SimpleChunkManager implements ChunkManager{
return false;
}
public function getBlockLightAt(int $x, int $y, int $z) : int{
if($this->terrainPointer->moveTo($x, $y, $z, false)){
return $this->terrainPointer->currentSubChunk->getBlockLight($x & 0xf, $y & 0xf, $z & 0xf);
}
return 0;
}
public function setBlockLightAt(int $x, int $y, int $z, int $level) : void{
if($this->terrainPointer->moveTo($x, $y, $z, false)){
$this->terrainPointer->currentSubChunk->setBlockLight($x & 0xf, $y & 0xf, $z & 0xf, $level);
}
}
public function getBlockSkyLightAt(int $x, int $y, int $z) : int{
if($this->terrainPointer->moveTo($x, $y, $z, false)){
return $this->terrainPointer->currentSubChunk->getBlockSkyLight($x & 0xf, $y & 0xf, $z & 0xf);
}
return 0;
}
public function setBlockSkyLightAt(int $x, int $y, int $z, int $level) : void{
if($this->terrainPointer->moveTo($x, $y, $z, false)){
$this->terrainPointer->currentSubChunk->setBlockSkyLight($x & 0xf, $y & 0xf, $z & 0xf, $level);
}
}
/**
* @param int $chunkX
* @param int $chunkZ