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:
@ -49,6 +49,8 @@ abstract class Liquid extends Transparent{
|
||||
protected int $decay = 0; //PC "level" property
|
||||
protected bool $still = false;
|
||||
|
||||
public function getRequiredStateDataBits() : int{ return 5; }
|
||||
|
||||
protected function decodeState(BlockDataReader $r) : void{
|
||||
$this->decay = $r->readBoundedInt(3, 0, self::MAX_DECAY);
|
||||
$this->falling = $r->readBool();
|
||||
|
Reference in New Issue
Block a user