From 41a179e6e1b7c4611a89eeed9c1ed17833281de5 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 5 Jun 2018 18:12:45 +0100 Subject: [PATCH] BlockFactory: fix bug in light filters which could result in negative light levels (and therefore wraparounds) --- src/pocketmine/block/BlockFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/block/BlockFactory.php b/src/pocketmine/block/BlockFactory.php index cfa0e88ae..6101cde27 100644 --- a/src/pocketmine/block/BlockFactory.php +++ b/src/pocketmine/block/BlockFactory.php @@ -361,7 +361,7 @@ class BlockFactory{ self::$transparent[$id] = $block->isTransparent(); self::$hardness[$id] = $block->getHardness(); self::$light[$id] = $block->getLightLevel(); - self::$lightFilter[$id] = $block->getLightFilter() + 1; //opacity plus 1 standard light filter + self::$lightFilter[$id] = min(15, $block->getLightFilter() + 1); //opacity plus 1 standard light filter self::$diffusesSkyLight[$id] = $block->diffusesSkyLight(); self::$blastResistance[$id] = $block->getBlastResistance(); }