[ Facing::SOUTH, Facing::EAST ], BlockLegacyMetadata::RAIL_CURVE_SOUTHWEST => [ Facing::SOUTH, Facing::WEST ], BlockLegacyMetadata::RAIL_CURVE_NORTHWEST => [ Facing::NORTH, Facing::WEST ], BlockLegacyMetadata::RAIL_CURVE_NORTHEAST => [ Facing::NORTH, Facing::EAST ] ]; protected function readRailShapeFromMeta(int $stateMeta) : ?int{ return isset(self::CURVE_CONNECTIONS[$stateMeta]) || isset(self::CONNECTIONS[$stateMeta]) ? $stateMeta : null; } protected function getShapeForConnections(array $connections) : int{ try{ return self::searchState($connections, self::CURVE_CONNECTIONS); }catch(\InvalidArgumentException $e){ return parent::getShapeForConnections($connections); } } protected function getCurrentShapeConnections() : array{ return self::CURVE_CONNECTIONS[$this->railShape] ?? self::CONNECTIONS[$this->railShape]; } protected function getPossibleConnectionDirectionsOneConstraint(int $constraint) : array{ $possible = parent::getPossibleConnectionDirectionsOneConstraint($constraint); if(($constraint & self::FLAG_ASCEND) === 0){ foreach([ Facing::NORTH, Facing::SOUTH, Facing::WEST, Facing::EAST ] as $d){ if($constraint !== $d){ $possible[$d] = true; } } } return $possible; } }