mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +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:
@ -54,7 +54,7 @@ class Anvil extends Transparent implements Fallable{
|
||||
}
|
||||
|
||||
protected function encodeType(RuntimeDataWriter $w) : void{
|
||||
$w->writeInt(2, $this->getDamage());
|
||||
$w->writeBoundedInt(2, self::UNDAMAGED, self::VERY_DAMAGED, $this->getDamage());
|
||||
}
|
||||
|
||||
public function getRequiredStateDataBits() : int{ return 2; }
|
||||
|
Reference in New Issue
Block a user