mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Block: specifying required type/state data bits is no longer required
RuntimeDataSizeCalculator allows calculating the number of required bits from describeType directly, which considerably reduces boilerplate code.
This commit is contained in:
@ -38,8 +38,6 @@ class SeaPickle extends Transparent{
|
||||
protected int $count = self::MIN_COUNT;
|
||||
protected bool $underwater = false;
|
||||
|
||||
public function getRequiredStateDataBits() : int{ return 3; }
|
||||
|
||||
protected function describeState(RuntimeDataDescriber $w) : void{
|
||||
$w->boundedInt(2, self::MIN_COUNT, self::MAX_COUNT, $this->count);
|
||||
$w->bool($this->underwater);
|
||||
|
Reference in New Issue
Block a user