mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +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:
@ -43,8 +43,6 @@ class RedstoneRepeater extends Flowable{
|
||||
|
||||
protected int $delay = self::MIN_DELAY;
|
||||
|
||||
public function getRequiredStateDataBits() : int{ return 5; }
|
||||
|
||||
protected function describeState(RuntimeDataDescriber $w) : void{
|
||||
$w->horizontalFacing($this->facing);
|
||||
$w->boundedInt(2, self::MIN_DELAY, self::MAX_DELAY, $this->delay);
|
||||
|
Reference in New Issue
Block a user