PHP Класс pocketmine\entity\Minecart

Наследование: extends Vehicle
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$drag
$gravity
$height
$isMoving
$moveSpeed
$width

Открытые методы

Метод Описание
getName ( ) : string
getNearestRail ( ) : Rail
getType ( ) : integer
initEntity ( )
onUpdate ( $currentTick )
spawnTo ( Player $player )

Приватные методы

Метод Описание
checkForTurn ( Direction $currentDirection, Direction $newDirection ) : Direction Need to alter direction on curves halfway through the turn and reset the minecart to be in the middle of the rail again so as not to collide with nearby blocks.
checkForVertical ( $railType, $currentDirection )
checkIfOnRail ( ) Check if minecart is currently on a rail and if so center the cart.
forwardOnRail ( Player $player ) : boolean Attempt to move forward on rail given the direction the cart is already moving, or if not moving based on the direction the player is looking.
getCurrentRail ( )
getDirectionToMove ( RailType $railType, Direction $candidateDirection ) : Direction Determine the direction the minecart should move based on the candidate direction (current direction minecart is moving, or the direction the player is looking) and the type of rail that the minecart is on.
isRail ( $rail )
moveIfRail ( ) : boolean Move the minecart as long as it will still be moving on to another piece of rail.
moveUsingVector ( Vector3 $desiredPosition ) Invoke the normal move code, but first need to convert the desired position vector into the delta values from the current position.

Описание методов

getName() публичный Метод

public getName ( ) : string
Результат string

getNearestRail() публичный Метод

public getNearestRail ( ) : Rail
Результат pocketmine\block\Rail

getType() публичный Метод

public getType ( ) : integer
Результат integer

initEntity() публичный Метод

public initEntity ( )

onUpdate() публичный Метод

public onUpdate ( $currentTick )

spawnTo() публичный Метод

public spawnTo ( Player $player )
$player pocketmine\Player

Описание свойств

$drag публичное свойство

public $drag

$gravity публичное свойство

public $gravity

$height публичное свойство

public $height

$isMoving публичное свойство

public $isMoving

$moveSpeed публичное свойство

public $moveSpeed

$width публичное свойство

public $width