Метод |
Описание |
|
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. |
|