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:
@ -33,6 +33,8 @@ class FrostedIce extends Ice{
|
||||
|
||||
protected int $age = 0;
|
||||
|
||||
public function getRequiredStateDataBits() : int{ return 2; }
|
||||
|
||||
protected function decodeState(BlockDataReader $r) : void{
|
||||
$this->age = $r->readBoundedInt(2, 0, self::MAX_AGE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user