public interface Minecart extends Entity
Modifier and Type | Method and Description |
---|---|
boolean |
doesSlowWhenEmpty()
Gets whether or not the minecart slows down faster without a passenger.
|
com.flowpowered.math.vector.Vector3d |
getAirborneVelocityMod()
Gets the velocity modifier applied when the minecart is airborne.
|
com.flowpowered.math.vector.Vector3d |
getDerailedVelocityMod()
Gets the velocity modifier applied when the minecart is not on rails.
|
double |
getPotentialMaxSpeed()
Gets the maximum speed that this cart is allowed to travel at the instant
this method is called.
|
double |
getSwiftness()
Gets the absolute maximum speed that this cart is allowed to travel at.
|
boolean |
isOnRail()
Gets whether or not the minecart is currently on a valid rail block.
|
void |
setAirborneVelocityMod(com.flowpowered.math.vector.Vector3d airborneVelocityMod)
Sets the velocity modifier applied when the minecart is airborne.
|
void |
setDerailedVelocityMod(com.flowpowered.math.vector.Vector3d derailedVelocityMod)
Sets the velocity modifier applied when the minecart is not on rails.
|
void |
setSlowWhenEmpty(boolean slowWhenEmpty)
Sets whether or not the minecart slows down faster without a passenger.
|
void |
setSwiftness(double swiftness)
Sets the absolute maximum speed that this cart is allowed to travel at.
|
createSnapshot, damage, getLocation, getRotation, getScale, getTransform, getType, getWorld, isLoaded, isOnGround, isRemoved, remove, setLocation, setLocationAndRotation, setLocationAndRotation, setLocationAndRotationSafely, setLocationAndRotationSafely, setLocationSafely, setRotation, setScale, setTransform, transferToWorld, transferToWorld
getUniqueId
setRawData, validateRawData
toContainer
getApplicableProperties, getProperty
boolean isOnRail()
double getSwiftness()
The default value is 0.4.
void setSwiftness(double swiftness)
The default value is 0.4.
swiftness
- The new maximum speeddouble getPotentialMaxSpeed()
This differs from getSwiftness()
in that its value is
affected by the block/rail beneath the cart. However, it is still
impacted and limited by the cart's swiftness.
boolean doesSlowWhenEmpty()
void setSlowWhenEmpty(boolean slowWhenEmpty)
slowWhenEmpty
- If the cart should slow when emotycom.flowpowered.math.vector.Vector3d getAirborneVelocityMod()
void setAirborneVelocityMod(com.flowpowered.math.vector.Vector3d airborneVelocityMod)
airborneVelocityMod
- The new airborne velocity modifiercom.flowpowered.math.vector.Vector3d getDerailedVelocityMod()
void setDerailedVelocityMod(com.flowpowered.math.vector.Vector3d derailedVelocityMod)
derailedVelocityMod
- The new derailed velocity modifier