mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Block light bug fixes (#454)
* Fixed an age-old light calculation bug causing solid blocks to filter their own light, fixed #375, probably fixed #288
Light spread reduction should be done based on the _target's_ light filter level, not the source.
* Revert "Fix Glowing Obsidian lighting"
This hack is no longer necessary.
This reverts commit 35c33ba980
.
* Fixed wrong light levels for torch and redstone torch
* Take adjacent light levels and opacity changes into account, block light will now spread when an obstruction is removed, close #455
* Added timings for Level->setBlock() and lighting updates
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
namespace pocketmine\block;
|
||||
|
||||
|
||||
class GlowingObsidian extends Transparent{
|
||||
class GlowingObsidian extends Solid{
|
||||
|
||||
protected $id = self::GLOWING_OBSIDIAN;
|
||||
|
||||
|
@ -32,4 +32,8 @@ class RedstoneTorch extends Torch{
|
||||
public function getName(){
|
||||
return "Redstone Torch";
|
||||
}
|
||||
|
||||
public function getLightLevel(){
|
||||
return 7;
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class Torch extends Flowable{
|
||||
}
|
||||
|
||||
public function getLightLevel(){
|
||||
return 15;
|
||||
return 14;
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
|
Reference in New Issue
Block a user