Skip to content

BaseRail ​

abstract class · pocketmine\block\BaseRail · source

Extends Flowable

Methods ​

getCurrentShapeConnections() protected ​

php
abstract protected function getCurrentShapeConnections() : array

Returns the connection directions of this rail (depending on the current block state)

getPossibleConnectionDirectionsOneConstraint() protected ​

php
protected function getPossibleConnectionDirectionsOneConstraint(int $constraint) : array

onNearbyBlockChange() ​

php
public function onNearbyBlockChange() : void

onPostPlace() ​

php
public function onPostPlace() : void

place() ​

php
public function place(\pocketmine\world\BlockTransaction $tx, \pocketmine\item\Item $item, \pocketmine\block\Block $blockReplace, \pocketmine\block\Block $blockClicked, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null) : bool

searchState() protected ​

php
protected static function searchState(array $connections, array $lookup) : ?int

setShapeFromConnections() protected ​

php
abstract protected function setShapeFromConnections(array $connections) : void

Sets the rail shape according to the given connections, if a shape matches.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.