org.bukkit.entity
Interface Minecart

All Superinterfaces:
Entity, Metadatable, Vehicle
All Known Subinterfaces:
ExplosiveMinecart, HopperMinecart, PoweredMinecart, PoweredMinecart, RideableMinecart, SpawnerMinecart, StorageMinecart, StorageMinecart

public interface Minecart
extends Vehicle

Represents a minecart entity.


Method Summary
 int getDamage()
          Gets a minecart's damage.
 Vector getDerailedVelocityMod()
          Gets the derailed velocity modifier.
 Vector getFlyingVelocityMod()
          Gets the flying velocity modifier.
 double getMaxSpeed()
          Gets the maximum speed of a minecart.
 boolean isSlowWhenEmpty()
          Returns whether this minecart will slow down faster without a passenger occupying it
 void setDamage(int damage)
          Sets a minecart's damage.
 void setDerailedVelocityMod(Vector derailed)
          Sets the derailed velocity modifier.
 void setFlyingVelocityMod(Vector flying)
          Sets the flying velocity modifier.
 void setMaxSpeed(double speed)
          Sets the maximum speed of a minecart.
 void setSlowWhenEmpty(boolean slow)
          Sets whether this minecart will slow down faster without a passenger occupying it
 
Methods inherited from interface org.bukkit.entity.Vehicle
getVelocity, setVelocity
 
Methods inherited from interface org.bukkit.entity.Entity
eject, getEntityId, getFallDistance, getFireTicks, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getServer, getTicksLived, getType, getUniqueId, getVehicle, getWorld, isDead, isEmpty, isInsideVehicle, isOnGround, isValid, leaveVehicle, playEffect, remove, setFallDistance, setFireTicks, setLastDamageCause, setPassenger, setTicksLived, teleport, teleport, teleport, teleport
 
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
 

Method Detail

setDamage

void setDamage(int damage)
Sets a minecart's damage.

Parameters:
damage - over 40 to "kill" a minecart

getDamage

int getDamage()
Gets a minecart's damage.

Returns:
The damage

getMaxSpeed

double getMaxSpeed()
Gets the maximum speed of a minecart. The speed is unrelated to the velocity.

Returns:
The max speed

setMaxSpeed

void setMaxSpeed(double speed)
Sets the maximum speed of a minecart. Must be nonnegative. Default is 0.4D.

Parameters:
speed - The max speed

isSlowWhenEmpty

boolean isSlowWhenEmpty()
Returns whether this minecart will slow down faster without a passenger occupying it

Returns:
Whether it decelerates faster

setSlowWhenEmpty

void setSlowWhenEmpty(boolean slow)
Sets whether this minecart will slow down faster without a passenger occupying it

Parameters:
slow - Whether it will decelerate faster

getFlyingVelocityMod

Vector getFlyingVelocityMod()
Gets the flying velocity modifier. Used for minecarts that are in mid-air. A flying minecart's velocity is multiplied by this factor each tick.

Returns:
The vector factor

setFlyingVelocityMod

void setFlyingVelocityMod(Vector flying)
Sets the flying velocity modifier. Used for minecarts that are in mid-air. A flying minecart's velocity is multiplied by this factor each tick.

Parameters:
flying - velocity modifier vector

getDerailedVelocityMod

Vector getDerailedVelocityMod()
Gets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails.

A derailed minecart's velocity is multiplied by this factor each tick.

Returns:
derailed visible speed

setDerailedVelocityMod

void setDerailedVelocityMod(Vector derailed)
Sets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails. A derailed minecart's velocity is multiplied by this factor each tick.

Parameters:
derailed - visible speed


Copyright © 2013. All Rights Reserved.