lit = $r->readBool(); } protected function encodeState(BlockDataWriter $w) : void{ parent::encodeState($w); $w->writeBool($this->lit); } public function isLit() : bool{ return $this->lit; } /** * @return $this */ public function setLit(bool $lit = true) : self{ $this->lit = $lit; return $this; } public function getLightLevel() : int{ return $this->lit ? 7 : 0; } }