mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Improve BlockFactory initialization performance
as expected, expanding data range unconditionally resulted in some performance issues ...
This commit is contained in:
@ -39,6 +39,8 @@ class SeaPickle extends Transparent{
|
||||
protected int $count = self::MIN_COUNT;
|
||||
protected bool $underwater = false;
|
||||
|
||||
public function getRequiredStateDataBits() : int{ return 3; }
|
||||
|
||||
protected function decodeState(BlockDataReader $r) : void{
|
||||
$this->count = $r->readBoundedInt(2, self::MIN_COUNT - 1, self::MAX_COUNT - 1) + 1;
|
||||
$this->underwater = $r->readBool();
|
||||
|
Reference in New Issue
Block a user