Class Minecart

java.lang.Object
  extended by BaseEntity
      extended by BaseVehicle
          extended by Minecart

public class Minecart
extends BaseVehicle

Minecart - Used for manipulating minecarts


Nested Class Summary
Modifier and Type Class and Description
static class Minecart.Type
          Type of minecart
 
Constructor Summary
Constructor and Description
Minecart(double x, double y, double z, Minecart.Type type)
          Create a new Minecart at the given position
Minecart(lw o)
          Creates an interface for minecart.
 
Method Summary
Modifier and Type Method and Description
 int getDamage()
          Returns damage for mineentity
 lw getEntity()
          Returns the entity we're wrapping.
 StorageMinecart getStorage()
          Returns the storage for this minecart.
 Minecart.Type getType()
          Returns the type of this minecart.
 void setDamage(int damage)
          Set damage on Mineentity
 
Methods inherited from class BaseVehicle
destroy, getMotionX, getMotionY, getMotionZ, getPassenger, isEmpty, setMotion, setMotionX, setMotionY, setMotionZ
 
Methods inherited from class BaseEntity
getAirTicks, getBaseAirTicks, 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

Minecart

public Minecart(lw o)
Creates an interface for minecart.

Parameters:
o -

Minecart

public Minecart(double x,
                double y,
                double z,
                Minecart.Type type)
Create a new Minecart at the given position

Parameters:
x -
y -
z -
Type - 0=Minecart, 1=StorageCart, 2=PoweredMinecart
Method Detail

getEntity

public lw getEntity()
Returns the entity we're wrapping.

Overrides:
getEntity in class BaseEntity
Returns:

setDamage

public void setDamage(int damage)
Set damage on Mineentity

Parameters:
damage - over 40 and you "kill" the mineentity

getDamage

public int getDamage()
Returns damage for mineentity

Returns:
returns current damage

getType

public Minecart.Type getType()
Returns the type of this minecart.

Returns:
type

getStorage

public StorageMinecart getStorage()
Returns the storage for this minecart. Returns null if minecart is not a storage or powered minecart.

Returns:
storage