mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Improve BlockFactory initialization performance
as expected, expanding data range unconditionally resulted in some performance issues ...
This commit is contained in:
@ -44,6 +44,8 @@ class RedstoneRepeater extends Flowable{
|
||||
|
||||
protected int $delay = self::MIN_DELAY;
|
||||
|
||||
public function getRequiredStateDataBits() : int{ return 5; }
|
||||
|
||||
protected function decodeState(BlockDataReader $r) : void{
|
||||
$this->facing = $r->readHorizontalFacing();
|
||||
$this->delay = $r->readBoundedInt(2, self::MIN_DELAY - 1, self::MAX_DELAY - 1) + 1;
|
||||
|
Reference in New Issue
Block a user