mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Offset integer ranges in runtime block data serialization
this is useful for stuff like snow layers where the range doesn't start at 0.
This commit is contained in:
@ -53,7 +53,7 @@ class SweetBerryBush extends Flowable{
|
||||
}
|
||||
|
||||
protected function encodeState(RuntimeDataWriter $w) : void{
|
||||
$w->writeInt(3, $this->age);
|
||||
$w->writeBoundedInt(3, self::STAGE_SAPLING, self::STAGE_MATURE, $this->age);
|
||||
}
|
||||
|
||||
public function getAge() : int{ return $this->age; }
|
||||
|
Reference in New Issue
Block a user