![]() |
Bukkit
1.4.7-R1.0
|
Represents a minecart entity. More...
Inheritance diagram for org.bukkit.entity.Minecart:
Collaboration diagram for org.bukkit.entity.Minecart:Public Member Functions | |
| void | setDamage (int damage) |
| Sets a minecart's damage. | |
| int | getDamage () |
| Gets a minecart's damage. | |
| double | getMaxSpeed () |
| Gets the maximum speed of a minecart. | |
| void | setMaxSpeed (double speed) |
| Sets the maximum speed of a minecart. | |
| boolean | isSlowWhenEmpty () |
| Returns whether this minecart will slow down faster without a passenger occupying it. | |
| void | setSlowWhenEmpty (boolean slow) |
| Sets whether this minecart will slow down faster without a passenger occupying it. | |
| Vector | getFlyingVelocityMod () |
| Gets the flying velocity modifier. | |
| void | setFlyingVelocityMod (Vector flying) |
| Sets the flying velocity modifier. | |
| Vector | getDerailedVelocityMod () |
| Gets the derailed velocity modifier. | |
| void | setDerailedVelocityMod (Vector derailed) |
| Sets the derailed velocity modifier. | |
Public Member Functions inherited from org.bukkit.entity.Vehicle | |
| Vector | getVelocity () |
| Gets the vehicle's velocity. | |
| void | setVelocity (Vector vel) |
| Sets the vehicle's velocity. | |
Public Member Functions inherited from org.bukkit.entity.Entity | |
| Location | getLocation () |
| Gets the entity's current position. | |
| Location | getLocation (Location loc) |
| Stores the entity's current position in the provided Location object. | |
| void | setVelocity (Vector velocity) |
| Sets this entity's velocity. | |
| Vector | getVelocity () |
| Gets this entity's current velocity. | |
| World | getWorld () |
| Gets the current world this entity resides in. | |
| boolean | teleport (Location location) |
| Teleports this entity to the given location. | |
| boolean | teleport (Location location, TeleportCause cause) |
| Teleports this entity to the given location. | |
| boolean | teleport (Entity destination) |
| Teleports this entity to the target Entity. | |
| boolean | teleport (Entity destination, TeleportCause cause) |
| Teleports this entity to the target Entity. | |
| List< org.bukkit.entity.Entity > | getNearbyEntities (double x, double y, double z) |
| Returns a list of entities within a bounding box centered around this entity. | |
| int | getEntityId () |
| Returns a unique id for this entity. | |
| int | getFireTicks () |
| Returns the entity's current fire ticks (ticks before the entity stops being on fire). | |
| int | getMaxFireTicks () |
| Returns the entity's maximum fire ticks. | |
| void | setFireTicks (int ticks) |
| Sets the entity's current fire ticks (ticks before the entity stops being on fire). | |
| void | remove () |
| Mark the entity's removal. | |
| boolean | isDead () |
| Returns true if this entity has been marked for removal. | |
| boolean | isValid () |
| Returns false if the entity has died or been despawned for some other reason. | |
| Server | getServer () |
| Gets the Server that contains this Entity. | |
| abstract Entity | getPassenger () |
| Gets the primary passenger of a vehicle. | |
| abstract boolean | setPassenger (Entity passenger) |
| Set the passenger of a vehicle. | |
| abstract boolean | isEmpty () |
| Check if a vehicle has passengers. | |
| abstract boolean | eject () |
| Eject any passenger. | |
| float | getFallDistance () |
| Returns the distance this entity has fallen. | |
| void | setFallDistance (float distance) |
| Sets the fall distance for this entity. | |
| void | setLastDamageCause (EntityDamageEvent event) |
| Record the last EntityDamageEvent inflicted on this entity. | |
| EntityDamageEvent | getLastDamageCause () |
| Retrieve the last EntityDamageEvent inflicted on this entity. | |
| UUID | getUniqueId () |
| Returns a unique and persistent id for this entity. | |
| int | getTicksLived () |
| Gets the amount of ticks this entity has lived for. | |
| void | setTicksLived (int value) |
| Sets the amount of ticks this entity has lived for. | |
| void | playEffect (EntityEffect type) |
| Performs the specified EntityEffect for this entity. | |
| EntityType | getType () |
| Get the type of the entity. | |
| boolean | isInsideVehicle () |
| Returns whether this entity is inside a vehicle. | |
| boolean | leaveVehicle () |
| Leave the current vehicle. | |
| Entity | getVehicle () |
| Get the vehicle that this player is inside. | |
Public Member Functions inherited from org.bukkit.metadata.Metadatable | |
| void | setMetadata (String metadataKey, MetadataValue newMetadataValue) |
| Sets a metadata value in the implementing object's metadata store. | |
| List< MetadataValue > | getMetadata (String metadataKey) |
| Returns a list of previously set metadata values from the implementing object's metadata store. | |
| boolean | hasMetadata (String metadataKey) |
| Tests to see whether the implementing object contains the given metadata value in its metadata store. | |
| void | removeMetadata (String metadataKey, Plugin owningPlugin) |
| Removes the given metadata value from the implementing object's metadata store. | |
Represents a minecart entity.
Definition at line 8 of file Minecart.java.
| int org.bukkit.entity.Minecart.getDamage | ( | ) |
Gets a minecart's damage.
| Vector org.bukkit.entity.Minecart.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.
| Vector org.bukkit.entity.Minecart.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.
| double org.bukkit.entity.Minecart.getMaxSpeed | ( | ) |
Gets the maximum speed of a minecart.
The speed is unrelated to the velocity.
| boolean org.bukkit.entity.Minecart.isSlowWhenEmpty | ( | ) |
Returns whether this minecart will slow down faster without a passenger occupying it.
| void org.bukkit.entity.Minecart.setDamage | ( | int | damage | ) |
Sets a minecart's damage.
| damage | over 40 to "kill" a minecart |
| void org.bukkit.entity.Minecart.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.
| derailed | visible speed |
| void org.bukkit.entity.Minecart.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.
| flying | velocity modifier vector |
| void org.bukkit.entity.Minecart.setMaxSpeed | ( | double | speed | ) |
Sets the maximum speed of a minecart.
Must be nonnegative. Default is 0.4D.
| speed | The max speed |
| void org.bukkit.entity.Minecart.setSlowWhenEmpty | ( | boolean | slow | ) |
Sets whether this minecart will slow down faster without a passenger occupying it.
| slow | Whether it will decelerate faster |