rotation = $stateMeta; } protected function writeStateToMeta() : int{ return $this->rotation; } public function getStateBitmask() : int{ return 0b1111; } protected function getSupportingFace() : int{ return Facing::DOWN; } public function place(BlockTransaction $tx, Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, ?Player $player = null) : bool{ if($face !== Facing::UP){ return false; } if($player !== null){ $this->rotation = self::getRotationFromYaw($player->getLocation()->getYaw()); } return parent::place($tx, $item, $blockReplace, $blockClicked, $face, $clickVector, $player); } }