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.
|
addPassenger, canSee, clearPassengers, createArchetype, createSnapshot, damage, getBaseVehicle, getBoundingBox, getCreator, getNearbyEntities, getNearbyEntities, getNotifier, getPassengers, getRandom, getRotation, getScale, getTransform, getType, getVehicle, getVelocity, gravity, hasPassenger, isLoaded, isOnGround, isRemoved, remove, removePassenger, setCreator, setLocation, setLocationAndRotation, setLocationAndRotation, setLocationAndRotationSafely, setLocationAndRotationSafely, setLocationSafely, setNotifier, setRotation, setScale, setTransform, setTransformSafely, setVehicle, setVelocity, transferToWorld, transferToWorld, transferToWorld, transferToWorld
getUniqueId
getLocation, getWorld
setRawData, validateRawData
getContentVersion, toContainer
getApplicableProperties, getProperty
copyFrom, copyFrom, get, getContainers, getOrCreate, offer, offer, offer, offer, offer, offer, remove, remove, remove, require, supports, transform, tryOffer, tryOffer, tryOffer, tryOffer, undo
copy, get, getKeys, getOrElse, getOrNull, getValue, getValues, require, supports, supports
getTranslation
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 emptycom.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