facing) | ($this->connected ? 0x04 : 0) | ($this->powered ? 0x08 : 0); } public function readStateFromData(int $id, int $stateMeta) : void{ $this->facing = BlockDataValidator::readLegacyHorizontalFacing($stateMeta & 0x03); $this->connected = ($stateMeta & 0x04) !== 0; $this->powered = ($stateMeta & 0x08) !== 0; } public function getStateBitmask() : int{ return 0b1111; } public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, ?Player $player = null) : bool{ if(Facing::axis($face) !== Facing::AXIS_Y){ //TODO: check face is valid $this->facing = $face; return parent::place($item, $blockReplace, $blockClicked, $face, $clickVector, $player); } return false; } //TODO }