mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Improve BlockFactory initialization performance
as expected, expanding data range unconditionally resulted in some performance issues ...
This commit is contained in:
@ -29,6 +29,8 @@ use pocketmine\block\utils\BlockDataWriter;
|
||||
class RedstoneTorch extends Torch{
|
||||
protected bool $lit = true;
|
||||
|
||||
public function getRequiredStateDataBits() : int{ return parent::getRequiredStateDataBits() + 1; }
|
||||
|
||||
protected function decodeState(BlockDataReader $r) : void{
|
||||
parent::decodeState($r);
|
||||
$this->lit = $r->readBool();
|
||||
|
Reference in New Issue
Block a user