Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
Minecart.java
1 package org.bukkit.entity;
2 
3 import org.bukkit.util.Vector;
4 
5 /**
6  * Represents a minecart entity.
7  */
8 public interface Minecart extends Vehicle {
9 
10  /**
11  * This method exists for legacy reasons to provide backwards
12  * compatibility. It will not exist at runtime and should not be used
13  * under any circumstances.
14  */
15  @Deprecated
16  public void _INVALID_setDamage(int damage);
17 
18  /**
19  * Sets a minecart's damage.
20  *
21  * @param damage over 40 to "kill" a minecart
22  */
23  public void setDamage(double damage);
24 
25  /**
26  * This method exists for legacy reasons to provide backwards
27  * compatibility. It will not exist at runtime and should not be used
28  * under any circumstances.
29  */
30  @Deprecated
31  public int _INVALID_getDamage();
32 
33  /**
34  * Gets a minecart's damage.
35  *
36  * @return The damage
37  */
38  public double getDamage();
39 
40  /**
41  * Gets the maximum speed of a minecart. The speed is unrelated to the
42  * velocity.
43  *
44  * @return The max speed
45  */
46  public double getMaxSpeed();
47 
48  /**
49  * Sets the maximum speed of a minecart. Must be nonnegative. Default is
50  * 0.4D.
51  *
52  * @param speed The max speed
53  */
54  public void setMaxSpeed(double speed);
55 
56  /**
57  * Returns whether this minecart will slow down faster without a passenger
58  * occupying it
59  *
60  * @return Whether it decelerates faster
61  */
62  public boolean isSlowWhenEmpty();
63 
64  /**
65  * Sets whether this minecart will slow down faster without a passenger
66  * occupying it
67  *
68  * @param slow Whether it will decelerate faster
69  */
70  public void setSlowWhenEmpty(boolean slow);
71 
72  /**
73  * Gets the flying velocity modifier. Used for minecarts that are in
74  * mid-air. A flying minecart's velocity is multiplied by this factor each
75  * tick.
76  *
77  * @return The vector factor
78  */
80 
81  /**
82  * Sets the flying velocity modifier. Used for minecarts that are in
83  * mid-air. A flying minecart's velocity is multiplied by this factor each
84  * tick.
85  *
86  * @param flying velocity modifier vector
87  */
88  public void setFlyingVelocityMod(Vector flying);
89 
90  /**
91  * Gets the derailed velocity modifier. Used for minecarts that are on the
92  * ground, but not on rails.
93  * <p>
94  * A derailed minecart's velocity is multiplied by this factor each tick.
95  *
96  * @return derailed visible speed
97  */
99 
100  /**
101  * Sets the derailed velocity modifier. Used for minecarts that are on the
102  * ground, but not on rails. A derailed minecart's velocity is multiplied
103  * by this factor each tick.
104  *
105  * @param derailed visible speed
106  */
107  public void setDerailedVelocityMod(Vector derailed);
108 }
void _INVALID_setDamage(int damage)
void setDamage(double damage)
void setSlowWhenEmpty(boolean slow)
void setMaxSpeed(double speed)
void setFlyingVelocityMod(Vector flying)
void setDerailedVelocityMod(Vector derailed)