mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +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:
@ -45,7 +45,7 @@ class Farmland extends Transparent{
|
||||
}
|
||||
|
||||
protected function encodeState(RuntimeDataWriter $w) : void{
|
||||
$w->writeInt(3, $this->wetness);
|
||||
$w->writeBoundedInt(3, 0, self::MAX_WETNESS, $this->wetness);
|
||||
}
|
||||
|
||||
public function getWetness() : int{ return $this->wetness; }
|
||||
|
Reference in New Issue
Block a user