PHP 클래스 pocketmine\entity\Minecart

상속: extends Vehicle
파일 보기 프로젝트 열기: iTXTech/Genisys 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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