Class MotionVector
java.lang.Object
org.bukkit.util.Vector
com.github.darksoulq.abyssallib.world.particle.style.Pixel
com.github.darksoulq.abyssallib.world.particle.style.MotionVector
- All Implemented Interfaces:
Cloneable, org.bukkit.configuration.serialization.ConfigurationSerializable
An extension of
Pixel that includes a velocity vector.
This class is primarily used when the particle system's "smoothing" feature
is enabled. It provides the ParticleRenderer
with the necessary data to spawn particles with directional movement, enabling
fluid client-side interpolation between animation frames.
-
Constructor Summary
ConstructorsConstructorDescriptionMotionVector(org.bukkit.util.Vector location, org.bukkit.util.Vector velocity) Constructs a new MotionVector with a default color ofColor.WHITE.MotionVector(org.bukkit.util.Vector location, org.bukkit.util.Vector velocity, org.bukkit.Color color) Constructs a new MotionVector with a specific location, velocity, and color. -
Method Summary
Modifier and TypeMethodDescription@NotNull MotionVectorclone()Creates a deep clone of this MotionVector.org.bukkit.util.VectorRetrieves the velocity vector for this point.Methods inherited from class org.bukkit.util.Vector
add, angle, checkFinite, copy, crossProduct, deserialize, distance, distanceSquared, divide, dot, equals, fromJOML, fromJOML, fromJOML, fromJOML, fromJOML, fromJOML, getBlockX, getBlockY, getBlockZ, getCrossProduct, getEpsilon, getMaximum, getMidpoint, getMinimum, getRandom, getX, getY, getZ, hashCode, isInAABB, isInSphere, isNormalized, isZero, length, lengthSquared, midpoint, multiply, multiply, multiply, multiply, normalize, rotateAroundAxis, rotateAroundNonUnitAxis, rotateAroundX, rotateAroundY, rotateAroundZ, serialize, setX, setX, setX, setY, setY, setY, setZ, setZ, setZ, subtract, toBlockVector, toLocation, toLocation, toString, toVector3d, toVector3f, toVector3i, toVector3i, zero
-
Constructor Details
-
MotionVector
public MotionVector(org.bukkit.util.Vector location, org.bukkit.util.Vector velocity, org.bukkit.Color color) Constructs a new MotionVector with a specific location, velocity, and color.- Parameters:
location- The current positionVector.velocity- The movementVector.color- TheColorof the particle.
-
MotionVector
public MotionVector(org.bukkit.util.Vector location, org.bukkit.util.Vector velocity) Constructs a new MotionVector with a default color ofColor.WHITE.- Parameters:
location- The current positionVector.velocity- The movementVector.
-
-
Method Details
-
getVelocity
public org.bukkit.util.Vector getVelocity()Retrieves the velocity vector for this point.- Returns:
- The
Vectorrepresenting velocity.
-
clone
Creates a deep clone of this MotionVector.- Overrides:
clonein classPixel- Returns:
- A new
MotionVectorinstance with cloned position and velocity.
-