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

public class MotionVector extends Pixel
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

    Constructors
    Constructor
    Description
    MotionVector(org.bukkit.util.Vector location, org.bukkit.util.Vector velocity)
    Constructs a new MotionVector with a default color of Color.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 Type
    Method
    Description
    @NotNull MotionVector
    Creates a deep clone of this MotionVector.
    org.bukkit.util.Vector
    Retrieves the velocity vector for this point.

    Methods inherited from class Pixel

    getColor

    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

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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 position Vector.
      velocity - The movement Vector.
      color - The Color of the particle.
    • MotionVector

      public MotionVector(org.bukkit.util.Vector location, org.bukkit.util.Vector velocity)
      Constructs a new MotionVector with a default color of Color.WHITE.
      Parameters:
      location - The current position Vector.
      velocity - The movement Vector.
  • Method Details

    • getVelocity

      public org.bukkit.util.Vector getVelocity()
      Retrieves the velocity vector for this point.
      Returns:
      The Vector representing velocity.
    • clone

      @NotNull public @NotNull MotionVector clone()
      Creates a deep clone of this MotionVector.
      Overrides:
      clone in class Pixel
      Returns:
      A new MotionVector instance with cloned position and velocity.