Class ParticleSFX

java.lang.Object
hm.zelha.particlesfx.util.ParticleSFX

public final class ParticleSFX extends Object
contains static utility methods with various functions meant to showcase how this dependency can be used.
  • Method Details

    • cube

      public static ParticlePolygon cube(Particle particle, LocationSafe center, double size, int particleFrequency)
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      size - the X and Z radius will be the same as the given size, and the Y radius will be the size * 0.75.
      particleFrequency - particle amount
      Returns:
      the shape displaying the cube
    • cubeFilled

      public static ParticlePolygonFilled cubeFilled(Particle particle, LocationSafe center, double size, int particleFrequency)
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      size - the X and Z radius will be the same as the given size, and the Y radius will be the size * 0.75.
      particleFrequency - particle amount
      Returns:
      the shape displaying the cube
    • pyramid

      public static ParticlePolygon pyramid(Particle particle, LocationSafe center, int sides, double size, int particleFrequency)
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      sides - how many sides the pyramid should have
      size - the X, Y, and Z radius of this pyramid
      particleFrequency - particle amount
      Returns:
      the shape displaying the pyramid
    • pyramidFilled

      public static ParticlePolygonFilled pyramidFilled(Particle particle, LocationSafe center, int sides, double size, int particleFrequency)
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      sides - how many sides the pyramid should have
      size - the X, Y, and Z radius of this pyramid
      particleFrequency - particle amount
      Returns:
      the shape displaying the pyramid
    • heart2D

      public static ParticleLineCurved heart2D(Particle particle, LocationSafe center, double size, int particleFrequency)
      the size parameter isn't followed exactly and will probably need some fine-tuning to get correct.
      if it helps, a size of 1 goes up from the center 1.2 blocks and down from the center 1.5 blocks.
      it'd be pretty complicated to fix and i don't want to spend that much time on an util method that barely anyone will use.
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      size - radius of the heart
      particleFrequency - particle amount
      Returns:
      the shape displaying the heart
    • star

      public static ParticleLine star(Particle particle, LocationSafe center, double size, int particleFrequency)
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      size - radius of the star
      particleFrequency - particle amount
      Returns:
      the shape displaying the star
    • pentagram

      public static ParticleLine pentagram(Particle particle, LocationSafe center, double size, int particleFrequency)
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      size - radius of the pentagram
      particleFrequency - particle amount
      Returns:
      the shape displaying the pentagram
    • donut

      public static ParticleCylinder donut(Particle particle, LocationSafe center, double xRadius, double zRadius, double circleSize, int circleFrequency, int particleFrequency)
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      xRadius - what the X radius should be
      zRadius - what the Z radius should be
      circleSize - radius of the circles that the donut will be made out of
      circleFrequency - number of circles to make the donut out of
      particleFrequency - particle amount
      Returns:
      the shape displaying the donut
    • donut

      public static ParticleCylinder donut(Particle particle, LocationSafe center, double radius, double circleSize, int circleFrequency, int particleFrequency)
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      radius - what the radius should be
      circleSize - radius of the circles that the donut will be made out of
      circleFrequency - number of circles to make the donut out of
      particleFrequency - particle amount
      Returns:
      the shape displaying the donut
    • donut

      public static ParticleCylinder donut(Particle particle, LocationSafe center, double radius, int circleFrequency, int particleFrequency)
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      radius - what the radius should be
      circleFrequency - number of circles to make the donut out of
      particleFrequency - particle amount
      Returns:
      the shape displaying the donut
    • donut

      public static ParticleCylinder donut(Particle particle, LocationSafe center, double radius, int particleFrequency)
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      radius - what the radius should be
      particleFrequency - particle amount
      Returns:
      the shape displaying the donut
    • cup

      public static ParticleShapeCompound cup(Particle particle, LocationSafe bottom, double xRadius, double zRadius, double height, int particleFrequency)
      The given ParticleShapeCompound contains a ParticleCylinder, named "cup", a ParticleSpiral, named "bottom", and a ParticleLineCurved, named "handle"

      You can get the individual shapes using ParticleShapeCompound.getShape(String)
      Parameters:
      particle - particle to use
      bottom - where the bottom of the cup should be
      xRadius - what the x radius should be
      zRadius - what the z radius should be
      height - what the height should be
      particleFrequency - particle amount
      Returns:
      a ParticleShapeCompound containing all the shapes used to display this cup
    • cup

      public static ParticleShapeCompound cup(Particle particle, LocationSafe bottom, double radius, double height, int particleFrequency)
      The given ParticleShapeCompound contains a ParticleCylinder, named "cup", a ParticleSpiral, named "bottom", and a ParticleLineCurved, named "handle"

      You can get the individual shapes using ParticleShapeCompound.getShape(String)
      Parameters:
      particle - particle to use
      bottom - where the bottom of the cup should be
      radius - what the radius should be
      height - what the height should be
      particleFrequency - particle amount
      Returns:
      a ParticleShapeCompound containing all the shapes used to display this cup
    • cup

      public static ParticleShapeCompound cup(Particle particle, LocationSafe bottom, double size, int particleFrequency)
      The given ParticleShapeCompound contains a ParticleCylinder, named "cup", a ParticleSpiral, named "bottom", and a ParticleLineCurved, named "handle"

      You can get the individual shapes using ParticleShapeCompound.getShape(String)
      Parameters:
      particle - particle to use
      bottom - where the bottom of the cup should be
      size - the x and z radius are the given size, and the height is the size * 2
      particleFrequency - particle amount
      Returns:
      a ParticleShapeCompound containing all the shapes used to display this cup
    • flower

      public static ParticleShapeCompound flower(Particle particle, LocationSafe bottom, double flowerSize, double stemHeight, int particleFrequency)
      The given ParticleShapeCompound contains a ParticleLineCurved, named "stem", and another ParticleShapeCompound, named "head", which contains 11 ParticleCircleFilleds, named "center" and "petal1" to "petal10"

      You can get the individual shapes using ParticleShapeCompound.getShape(String)
      Parameters:
      particle - particle to use
      bottom - where the bottom of the stem should be
      flowerSize - the radius of the flower
      stemHeight - the height of the stem
      particleFrequency - particle amount
      Returns:
      a ParticleShapeCompound containing all the shapes used to display this flower
    • flower

      public static ParticleShapeCompound flower(Particle particle, LocationSafe bottom, double size, int particleFrequency)
      The given ParticleShapeCompound contains a ParticleLineCurved, named "stem", and another ParticleShapeCompound, named "head", which contains 11 ParticleCircleFilleds, named "center" and "petal1" to "petal10"

      You can get the individual shapes using ParticleShapeCompound.getShape(String)
      Parameters:
      particle - particle to use
      bottom - where the bottom of the stem should be
      size - the stem height is equal to the given size, and the flower size is the given size * 0.15
      particleFrequency - particle amount
      Returns:
      a ParticleShapeCompound containing all the shapes used to display this flower
    • mushroom

      public static ParticleCylinder mushroom(Particle particle, LocationSafe bottom, double xRadius, double zRadius, double height, int particleFrequency)
      Parameters:
      particle - particle to use
      bottom - where the bottom of the shape should be
      xRadius - what the x radius should be
      zRadius - what the z radius should be
      height - what the height should be
      particleFrequency - particle amount
      Returns:
      the shape displaying the mushroom
    • mushroom

      public static ParticleCylinder mushroom(Particle particle, LocationSafe bottom, double radius, double height, int particleFrequency)
      Parameters:
      particle - particle to use
      bottom - where the bottom of the shape should be
      radius - what the radius should be
      height - what the height should be
      particleFrequency - particle amount
      Returns:
      the shape displaying the mushroom
    • mushroom

      public static ParticleCylinder mushroom(Particle particle, LocationSafe bottom, double size, int particleFrequency)
      Parameters:
      particle - particle to use
      bottom - where the bottom of the shape should be
      size - the X and Z radius will be the same as the given size, and the height will be the size * 2.6
      particleFrequency - particle amount
      Returns:
      the shape displaying the mushroom
    • sun

      public static ParticleSphere sun(TravellingParticle particle, LocationSafe center, double xRadius, double yRadius, double zRadius, int particleFrequency)
      Creates a sphere with the particles travelling away from the center
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      xRadius - what the X radius should be
      yRadius - what the Y radius should be
      zRadius - what the Z radius should be
      particleFrequency - particle amount
      Returns:
      the shape displaying the sun
    • sun

      public static ParticleSphere sun(TravellingParticle particle, LocationSafe center, double radius, int particleFrequency)
      Creates a sphere with the particles travelling away from the center.
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      radius - what the radius should be
      particleFrequency - particle amount
      Returns:
      the shape displaying the sun
    • atom

      public static ParticleShapeCompound atom(Particle nucleus, Particle electron, LocationSafe center, double radius, int particleFrequency)
      The given ParticleShapeCompound contains a ParticleSphere, named "nucleus", and three ParticleCircles, named "electron1" to "electron3"

      You can get the individual shapes using ParticleShapeCompound.getShape(String)
      Parameters:
      nucleus - particle to use for the nucleus
      electron - particle to use for the electrons
      center - the center of where the shape should be
      radius - what the radius should be
      particleFrequency - particle amount
      Returns:
      a ParticleShapeCompound containing all the shapes used to display this atom
    • atom

      public static ParticleShapeCompound atom(Particle particle, LocationSafe center, double radius, int particleFrequency)
      The given ParticleShapeCompound contains a ParticleSphere, named "nucleus", and three ParticleCircles, named "electron1" to "electron3"

      You can get the individual shapes using ParticleShapeCompound.getShape(String)
      Parameters:
      particle - particle to use
      center - the center of where the shape should be
      radius - what the radius should be
      particleFrequency - particle amount
      Returns:
      a ParticleShapeCompound containing all the shapes used to display this atom
    • raincloud

      public static ParticleFluid raincloud(Particle rainParticle, Particle cloudParticle, LocationSafe center, double xRadius, double yRadius, double zRadius, int rainAmount, int cloudAmount)
      Parameters:
      rainParticle - particle to use for rain
      cloudParticle - particle to use for the cloud
      center - the center of where the cloud should be and where the rain should spawn
      xRadius - what the x radius should be
      yRadius - what the y radius should be
      zRadius - what the z radius should be
      rainAmount - amount of rain particles
      cloudAmount - amount of cloud particles
      Returns:
      the shape displaying the raincloud
    • raincloud

      public static ParticleFluid raincloud(Particle rainParticle, Particle cloudParticle, LocationSafe center, double xRadius, double yRadius, double zRadius, int rainAmount)
      Parameters:
      rainParticle - particle to use for rain
      cloudParticle - particle to use for the cloud
      center - the center of where the cloud should be and where the rain should spawn
      xRadius - what the x radius should be
      yRadius - what the y radius should be
      zRadius - what the z radius should be
      rainAmount - amount of rain and cloud particles
      Returns:
      the shape displaying the raincloud
    • raincloud

      public static ParticleFluid raincloud(Particle rainParticle, Particle cloudParticle, LocationSafe center, double xRadius, double zRadius, int rainAmount)
      Parameters:
      rainParticle - particle to use for rain
      cloudParticle - particle to use for the cloud
      center - the center of where the cloud should be and where the rain should spawn
      xRadius - what the x radius should be
      zRadius - what the z radius should be
      rainAmount - amount of rain and cloud particles
      Returns:
      the shape displaying the raincloud
    • raincloud

      public static ParticleFluid raincloud(Particle rainParticle, Particle cloudParticle, LocationSafe center, double radius, int rainAmount)
      Parameters:
      rainParticle - particle to use for rain
      cloudParticle - particle to use for the cloud
      center - the center of where the cloud should be and where the rain should spawn
      radius - what the radius should be
      rainAmount - amount of rain and cloud particles
      Returns:
      the shape displaying the raincloud
    • tornado

      public static ParticleSpiral tornado(Particle particle, LocationSafe bottom, double xRadius, double zRadius, double height, int particleFrequency)
      Parameters:
      particle - particle to use
      bottom - where the bottom of the shape should be
      xRadius - what the X radius should be
      zRadius - what the Z radius should be
      height - how high this shape should extend
      particleFrequency - particle amount
      Returns:
      the shape displaying the tornado
    • tornado

      public static ParticleSpiral tornado(Particle particle, LocationSafe bottom, double radius, double height, int particleFrequency)
      Parameters:
      particle - particle to use
      bottom - where the bottom of the shape should be
      radius - what the radius should be
      height - how high this shape should extend
      particleFrequency - particle amount
      Returns:
      the shape displaying the tornado
    • getDirection

      public static double[] getDirection(org.bukkit.Location toFace, org.bukkit.Location location)
      Parameters:
      toFace - the location to get the direction towards
      location - the starting location
      Returns:
      a double array of the pitch and yaw of the direction where the pitch is [0] and the yaw is [1]
    • setPlugin

      public static void setPlugin(org.bukkit.plugin.Plugin plugin)
      Parameters:
      plugin - the plugin for all of this dependency's BukkitRunnables to be assigned to
    • getPlugin

      public static org.bukkit.plugin.Plugin getPlugin()
      Returns:
      the plugin that this dependency is using for BukkitRunnables