Class BaseVehicle

java.lang.Object
  extended by BaseEntity
      extended by BaseVehicle
Direct Known Subclasses:
Boat, Minecart

public class BaseVehicle
extends BaseEntity

BaseVehicle - Base class for interfacing boats and minecarts


Constructor Summary
Constructor and Description
BaseVehicle()
          Interface for vehicles.
BaseVehicle(fe entity)
          Creptes an interface for a vehicle
 
Method Summary
Modifier and Type Method and Description
 void destroy()
          Destroys this vehicle
 double getMotionX()
          Returns the x-motion of this vehicle
 double getMotionY()
          Returns the y-motion of this vehicle
 double getMotionZ()
          Returns the z-motion of this vehicle
 Player getPassenger()
          Returns the passenger.
 boolean isEmpty()
          Checks if this vehicle is empty (unoccupied)
 void setMotion(double motionX, double motionY, double motionZ)
          Set vehicle motion
 void setMotionX(double motion)
          Sets the x-motion of this vehicle
 void setMotionY(double motion)
          Sets the y-motion of this vehicle
 void setMotionZ(double motion)
          Sets the z-motion of this vehicle
 
Methods inherited from class BaseEntity
getAirTicks, getBaseAirTicks, getEntity, getFireTicks, getId, getNoDamageTicks, getPitch, getPlayer, getRotation, getX, getY, getZ, isAnimal, isLiving, isMob, isPlayer, setAirTicks, setBaseAirTicks, setFireTicks, setNoDamageTicks, setPitch, setRotation, setX, setY, setZ, teleportTo, teleportTo, teleportTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseVehicle

public BaseVehicle(fe entity)
Creptes an interface for a vehicle

Parameters:
entity -

BaseVehicle

public BaseVehicle()
Interface for vehicles.

Method Detail

getMotionX

public double getMotionX()
Returns the x-motion of this vehicle

Returns:
x-motion

getMotionY

public double getMotionY()
Returns the y-motion of this vehicle

Returns:
y-motion

getMotionZ

public double getMotionZ()
Returns the z-motion of this vehicle

Returns:
z-motion

setMotionX

public void setMotionX(double motion)
Sets the x-motion of this vehicle

Parameters:
motion - motion to set

setMotionY

public void setMotionY(double motion)
Sets the y-motion of this vehicle

Parameters:
motion - motion to set

setMotionZ

public void setMotionZ(double motion)
Sets the z-motion of this vehicle

Parameters:
motion - motion to set

setMotion

public void setMotion(double motionX,
                      double motionY,
                      double motionZ)
Set vehicle motion

Parameters:
motionX -
motionY -
motionZ -

destroy

public void destroy()
Destroys this vehicle


isEmpty

public boolean isEmpty()
Checks if this vehicle is empty (unoccupied)

Returns:
true if unoccupied.

getPassenger

public Player getPassenger()
Returns the passenger. If there is no passenger this function returns null.

Returns:
passenger