activated; } /** @return $this */ public function setActivated(bool $activated) : self{ $this->activated = $activated; return $this; } public function readStateFromData(int $id, int $stateMeta) : void{ parent::readStateFromData($id, $stateMeta & ~BlockLegacyMetadata::REDSTONE_RAIL_FLAG_POWERED); $this->activated = ($stateMeta & BlockLegacyMetadata::REDSTONE_RAIL_FLAG_POWERED) !== 0; } protected function writeStateToMeta() : int{ return parent::writeStateToMeta() | ($this->activated ? BlockLegacyMetadata::REDSTONE_RAIL_FLAG_POWERED : 0); } public function getStateBitmask() : int{ return 0b1111; } //TODO }