Package hm.zelha.particlesfx.util
Class ParticleSFX
java.lang.Object
hm.zelha.particlesfx.util.ParticleSFX
contains static utility methods with various functions meant to showcase how this dependency can be used.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ParticleShapeCompoundatom(Particle nucleus, Particle electron, LocationSafe center, double radius, int particleFrequency) The givenParticleShapeCompoundcontains aParticleSphere, named "nucleus", and threeParticleCircles, named "electron1" to "electron3"
You can get the individual shapes usingParticleShapeCompound.getShape(String)static ParticleShapeCompoundatom(Particle particle, LocationSafe center, double radius, int particleFrequency) The givenParticleShapeCompoundcontains aParticleSphere, named "nucleus", and threeParticleCircles, named "electron1" to "electron3"
You can get the individual shapes usingParticleShapeCompound.getShape(String)static ParticlePolygoncube(Particle particle, LocationSafe center, double size, int particleFrequency) static ParticlePolygonFilledcubeFilled(Particle particle, LocationSafe center, double size, int particleFrequency) static ParticleShapeCompoundcup(Particle particle, LocationSafe bottom, double xRadius, double zRadius, double height, int particleFrequency) The givenParticleShapeCompoundcontains aParticleCylinder, named "cup", aParticleSpiral, named "bottom", and aParticleLineCurved, named "handle"
You can get the individual shapes usingParticleShapeCompound.getShape(String)static ParticleShapeCompoundcup(Particle particle, LocationSafe bottom, double radius, double height, int particleFrequency) The givenParticleShapeCompoundcontains aParticleCylinder, named "cup", aParticleSpiral, named "bottom", and aParticleLineCurved, named "handle"
You can get the individual shapes usingParticleShapeCompound.getShape(String)static ParticleShapeCompoundcup(Particle particle, LocationSafe bottom, double size, int particleFrequency) The givenParticleShapeCompoundcontains aParticleCylinder, named "cup", aParticleSpiral, named "bottom", and aParticleLineCurved, named "handle"
You can get the individual shapes usingParticleShapeCompound.getShape(String)static ParticleCylinderdonut(Particle particle, LocationSafe center, double xRadius, double zRadius, double circleSize, int circleFrequency, int particleFrequency) static ParticleCylinderdonut(Particle particle, LocationSafe center, double radius, double circleSize, int circleFrequency, int particleFrequency) static ParticleCylinderdonut(Particle particle, LocationSafe center, double radius, int particleFrequency) static ParticleCylinderdonut(Particle particle, LocationSafe center, double radius, int circleFrequency, int particleFrequency) static ParticleShapeCompoundflower(Particle particle, LocationSafe bottom, double flowerSize, double stemHeight, int particleFrequency) The givenParticleShapeCompoundcontains aParticleLineCurved, named "stem", and another ParticleShapeCompound, named "head", which contains 11ParticleCircleFilleds, named "center" and "petal1" to "petal10"
You can get the individual shapes usingParticleShapeCompound.getShape(String)static ParticleShapeCompoundflower(Particle particle, LocationSafe bottom, double size, int particleFrequency) The givenParticleShapeCompoundcontains aParticleLineCurved, named "stem", and another ParticleShapeCompound, named "head", which contains 11ParticleCircleFilleds, named "center" and "petal1" to "petal10"
You can get the individual shapes usingParticleShapeCompound.getShape(String)static double[]getDirection(org.bukkit.Location toFace, org.bukkit.Location location) static org.bukkit.plugin.Pluginstatic ParticleLineCurvedheart2D(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.static ParticleCylindermushroom(Particle particle, LocationSafe bottom, double xRadius, double zRadius, double height, int particleFrequency) static ParticleCylindermushroom(Particle particle, LocationSafe bottom, double radius, double height, int particleFrequency) static ParticleCylindermushroom(Particle particle, LocationSafe bottom, double size, int particleFrequency) static ParticleLinepentagram(Particle particle, LocationSafe center, double size, int particleFrequency) static ParticlePolygonpyramid(Particle particle, LocationSafe center, int sides, double size, int particleFrequency) static ParticlePolygonFilledpyramidFilled(Particle particle, LocationSafe center, int sides, double size, int particleFrequency) static ParticleFluidraincloud(Particle rainParticle, Particle cloudParticle, LocationSafe center, double xRadius, double yRadius, double zRadius, int rainAmount) static ParticleFluidraincloud(Particle rainParticle, Particle cloudParticle, LocationSafe center, double xRadius, double yRadius, double zRadius, int rainAmount, int cloudAmount) static ParticleFluidraincloud(Particle rainParticle, Particle cloudParticle, LocationSafe center, double xRadius, double zRadius, int rainAmount) static ParticleFluidraincloud(Particle rainParticle, Particle cloudParticle, LocationSafe center, double radius, int rainAmount) static voidsetPlugin(org.bukkit.plugin.Plugin plugin) static ParticleLinestar(Particle particle, LocationSafe center, double size, int particleFrequency) static ParticleSpheresun(TravellingParticle particle, LocationSafe center, double xRadius, double yRadius, double zRadius, int particleFrequency) Creates a sphere with the particles travelling away from the centerstatic ParticleSpheresun(TravellingParticle particle, LocationSafe center, double radius, int particleFrequency) Creates a sphere with the particles travelling away from the center.static ParticleSpiraltornado(Particle particle, LocationSafe bottom, double xRadius, double zRadius, double height, int particleFrequency) static ParticleSpiraltornado(Particle particle, LocationSafe bottom, double radius, double height, int particleFrequency)
-
Method Details
-
cube
public static ParticlePolygon cube(Particle particle, LocationSafe center, double size, int particleFrequency) - Parameters:
particle- particle to usecenter- the center of where the shape should besize- 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 usecenter- the center of where the shape should besize- 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 usecenter- the center of where the shape should besides- how many sides the pyramid should havesize- the X, Y, and Z radius of this pyramidparticleFrequency- 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 usecenter- the center of where the shape should besides- how many sides the pyramid should havesize- the X, Y, and Z radius of this pyramidparticleFrequency- 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 usecenter- the center of where the shape should besize- radius of the heartparticleFrequency- 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 usecenter- the center of where the shape should besize- radius of the starparticleFrequency- 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 usecenter- the center of where the shape should besize- radius of the pentagramparticleFrequency- 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 usecenter- the center of where the shape should bexRadius- what the X radius should bezRadius- what the Z radius should becircleSize- radius of the circles that the donut will be made out ofcircleFrequency- number of circles to make the donut out ofparticleFrequency- 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 usecenter- the center of where the shape should beradius- what the radius should becircleSize- radius of the circles that the donut will be made out ofcircleFrequency- number of circles to make the donut out ofparticleFrequency- 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 usecenter- the center of where the shape should beradius- what the radius should becircleFrequency- number of circles to make the donut out ofparticleFrequency- 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 usecenter- the center of where the shape should beradius- what the radius should beparticleFrequency- 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 givenParticleShapeCompoundcontains aParticleCylinder, named "cup", aParticleSpiral, named "bottom", and aParticleLineCurved, named "handle"
You can get the individual shapes usingParticleShapeCompound.getShape(String)- Parameters:
particle- particle to usebottom- where the bottom of the cup should bexRadius- what the x radius should bezRadius- what the z radius should beheight- what the height should beparticleFrequency- 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 givenParticleShapeCompoundcontains aParticleCylinder, named "cup", aParticleSpiral, named "bottom", and aParticleLineCurved, named "handle"
You can get the individual shapes usingParticleShapeCompound.getShape(String)- Parameters:
particle- particle to usebottom- where the bottom of the cup should beradius- what the radius should beheight- what the height should beparticleFrequency- 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 givenParticleShapeCompoundcontains aParticleCylinder, named "cup", aParticleSpiral, named "bottom", and aParticleLineCurved, named "handle"
You can get the individual shapes usingParticleShapeCompound.getShape(String)- Parameters:
particle- particle to usebottom- where the bottom of the cup should besize- the x and z radius are the given size, and the height is the size * 2particleFrequency- 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 givenParticleShapeCompoundcontains aParticleLineCurved, named "stem", and another ParticleShapeCompound, named "head", which contains 11ParticleCircleFilleds, named "center" and "petal1" to "petal10"
You can get the individual shapes usingParticleShapeCompound.getShape(String)- Parameters:
particle- particle to usebottom- where the bottom of the stem should beflowerSize- the radius of the flowerstemHeight- the height of the stemparticleFrequency- 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 givenParticleShapeCompoundcontains aParticleLineCurved, named "stem", and another ParticleShapeCompound, named "head", which contains 11ParticleCircleFilleds, named "center" and "petal1" to "petal10"
You can get the individual shapes usingParticleShapeCompound.getShape(String)- Parameters:
particle- particle to usebottom- where the bottom of the stem should besize- the stem height is equal to the given size, and the flower size is the given size * 0.15particleFrequency- 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 usebottom- where the bottom of the shape should bexRadius- what the x radius should bezRadius- what the z radius should beheight- what the height should beparticleFrequency- 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 usebottom- where the bottom of the shape should beradius- what the radius should beheight- what the height should beparticleFrequency- 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 usebottom- where the bottom of the shape should besize- the X and Z radius will be the same as the given size, and the height will be the size * 2.6particleFrequency- 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 usecenter- the center of where the shape should bexRadius- what the X radius should beyRadius- what the Y radius should bezRadius- what the Z radius should beparticleFrequency- 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 usecenter- the center of where the shape should beradius- what the radius should beparticleFrequency- particle amount- Returns:
- the shape displaying the sun
-
atom
public static ParticleShapeCompound atom(Particle nucleus, Particle electron, LocationSafe center, double radius, int particleFrequency) The givenParticleShapeCompoundcontains aParticleSphere, named "nucleus", and threeParticleCircles, named "electron1" to "electron3"
You can get the individual shapes usingParticleShapeCompound.getShape(String)- Parameters:
nucleus- particle to use for the nucleuselectron- particle to use for the electronscenter- the center of where the shape should beradius- what the radius should beparticleFrequency- 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 givenParticleShapeCompoundcontains aParticleSphere, named "nucleus", and threeParticleCircles, named "electron1" to "electron3"
You can get the individual shapes usingParticleShapeCompound.getShape(String)- Parameters:
particle- particle to usecenter- the center of where the shape should beradius- what the radius should beparticleFrequency- 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 raincloudParticle- particle to use for the cloudcenter- the center of where the cloud should be and where the rain should spawnxRadius- what the x radius should beyRadius- what the y radius should bezRadius- what the z radius should berainAmount- amount of rain particlescloudAmount- 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 raincloudParticle- particle to use for the cloudcenter- the center of where the cloud should be and where the rain should spawnxRadius- what the x radius should beyRadius- what the y radius should bezRadius- what the z radius should berainAmount- 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 raincloudParticle- particle to use for the cloudcenter- the center of where the cloud should be and where the rain should spawnxRadius- what the x radius should bezRadius- what the z radius should berainAmount- 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 raincloudParticle- particle to use for the cloudcenter- the center of where the cloud should be and where the rain should spawnradius- what the radius should berainAmount- 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 usebottom- where the bottom of the shape should bexRadius- what the X radius should bezRadius- what the Z radius should beheight- how high this shape should extendparticleFrequency- 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 usebottom- where the bottom of the shape should beradius- what the radius should beheight- how high this shape should extendparticleFrequency- 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 towardslocation- 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
-