mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Allow static properties and state masks to vary based on variant
This commit is contained in:
@ -394,7 +394,7 @@ class Chunk{
|
||||
public function recalculateHeightMapColumn(int $x, int $z) : int{
|
||||
$max = $this->getHighestBlockAt($x, $z);
|
||||
for($y = $max; $y >= 0; --$y){
|
||||
if(BlockFactory::$lightFilter[$id = $this->getBlockId($x, $y, $z)] > 1 or BlockFactory::$diffusesSkyLight[$id]){
|
||||
if(BlockFactory::$lightFilter[$state = $this->getFullBlock($x, $y, $z)] > 1 or BlockFactory::$diffusesSkyLight[$state]){
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -426,7 +426,7 @@ class Chunk{
|
||||
$light = 15;
|
||||
for(; $y >= 0; --$y){
|
||||
if($light > 0){
|
||||
$light -= BlockFactory::$lightFilter[$this->getBlockId($x, $y, $z)];
|
||||
$light -= BlockFactory::$lightFilter[$this->getFullBlock($x, $y, $z)];
|
||||
if($light <= 0){
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user