axis = $r->readHorizontalAxis(); } protected function encodeState(BlockDataWriter $w) : void{ $w->writeHorizontalAxis($this->axis); } public function getAxis() : int{ return $this->axis; } /** * @throws \InvalidArgumentException * @return $this */ public function setAxis(int $axis) : self{ if($axis !== Axis::X && $axis !== Axis::Z){ throw new \InvalidArgumentException("Invalid axis"); } $this->axis = $axis; return $this; } public function getLightLevel() : int{ return 11; } public function isSolid() : bool{ return false; } /** * @return AxisAlignedBB[] */ protected function recalculateCollisionBoxes() : array{ return []; } public function getSupportType(int $facing) : SupportType{ return SupportType::NONE(); } public function getDrops(Item $item) : array{ return []; } public function onEntityInside(Entity $entity) : bool{ //TODO return true; } }