mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +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:
@ -39,8 +39,6 @@ use pocketmine\world\sound\FlintSteelSound;
|
||||
trait CandleTrait{
|
||||
private bool $lit = false;
|
||||
|
||||
public function getRequiredStateDataBits() : int{ return 1; }
|
||||
|
||||
protected function describeState(RuntimeDataDescriber $w) : void{
|
||||
$w->bool($this->lit);
|
||||
}
|
||||
|
Reference in New Issue
Block a user