mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 10:19:39 +00:00
Block: Derive light filter level based on isTransparent() return
this might be dynamic.
This commit is contained in:
parent
6cdd716c34
commit
12dd6adfcc
@ -450,7 +450,7 @@ class Block extends Position implements BlockIds, Metadatable{
|
|||||||
* @return int 0-15
|
* @return int 0-15
|
||||||
*/
|
*/
|
||||||
public function getLightFilter() : int{
|
public function getLightFilter() : int{
|
||||||
return 15;
|
return $this->isTransparent() ? 0 : 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,8 +29,4 @@ abstract class Transparent extends Block{
|
|||||||
public function isTransparent() : bool{
|
public function isTransparent() : bool{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLightFilter() : int{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user