Class TravellingParticle
java.lang.Object
hm.zelha.particlesfx.particles.parents.Particle
hm.zelha.particlesfx.particles.parents.TravellingParticle
- All Implemented Interfaces:
IParticle
- Direct Known Subclasses:
ParticleBubble,ParticleBubblePop,ParticleCampfireCosy,ParticleCampfireSignal,ParticleCloud,ParticleCrit,ParticleDamage,ParticleDragonBreath,ParticleDustPlume,ParticleEnchant,ParticleEnchantedHit,ParticleEndRod,ParticleFirework,ParticleFishing,ParticleFlame,ParticleFlameSmall,ParticleFlameSoul,ParticleGlowInk,ParticleItemBreak,ParticleNautilus,ParticleOminous,ParticlePoof,ParticlePortal,ParticleScrape,ParticleSculkCharge,ParticleSculkChargePop,ParticleSmoke,ParticleSmokeLarge,ParticleSmokeWhite,ParticleSneeze,ParticleSnowflake,ParticleSoul,ParticleSoulSculk,ParticleSpit,ParticleSquidInk,ParticleTotem,ParticleTrail,ParticleTrialOminous,ParticleTrialSpawner,ParticleVault,ParticleVibration,ParticleWaxOff,ParticleWaxOn
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final doubleprotected booleanprotected org.bukkit.Locationprotected org.bukkit.util.Vector -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTravellingParticle(String particleID, boolean inverse, double control, org.bukkit.util.Vector velocity, org.bukkit.Location toGo, double offsetX, double offsetY, double offsetZ, int count) -
Method Summary
Modifier and TypeMethodDescriptionabstract TravellingParticleclone()voiddisplay(org.bukkit.Location location, org.bukkit.Location toGo) Displays this particle with the given location and location to go without changing this object's toGo variablevoiddisplay(org.bukkit.Location location, org.bukkit.util.Vector velocity) Displays this particle with the given location and velocity without changing this object's velocity variablevoiddisplayForPlayers(org.bukkit.Location location, org.bukkit.Location toGo, org.bukkit.entity.Player... players) Displays this particle to the given players with the given location and location to go without changing this object's toGo variablevoiddisplayForPlayers(org.bukkit.Location location, org.bukkit.util.Vector velocity, org.bukkit.entity.Player... players) Displays this particle to the given players with the given location and velocity without changing this object's velocity variableorg.bukkit.Locationprotected org.bukkit.util.VectorgetOffsets(org.bukkit.Location location) Meant to be overridden by child classes to modify the offset values of the packet sent to the player.protected intMeant to be overridden by child classes to modify the count value of the packet sent to the player.protected floatMeant to be overridden by child classes to modify the speed value of the packet sent to the player.org.bukkit.util.Vectorprotected org.bukkit.util.VectorgetXYZ(org.bukkit.Location location) Meant to be overridden by child classes to modify the X/Y/Z values of the packet sent to the player.voidsetLocationToGo(double x, double y, double z) voidsetLocationToGo(org.bukkit.Location location) voidsetVelocity(double x, double y, double z) voidsetVelocity(org.bukkit.util.Vector velocity) Methods inherited from class hm.zelha.particlesfx.particles.parents.Particle
display, display, displayForPlayers, displayForPlayers, generateFakeOffset, getCount, getOffsetX, getOffsetY, getOffsetZ, getRadius, getSpeed, getStrangePacket, setCount, setOffset, setOffsetX, setOffsetY, setOffsetZ, setRadius, setSpeed
-
Field Details
-
control
protected final double control -
inverse
protected boolean inverse -
toGo
protected org.bukkit.Location toGo -
velocity
protected org.bukkit.util.Vector velocity
-
-
Constructor Details
-
TravellingParticle
protected TravellingParticle(String particleID, boolean inverse, double control, org.bukkit.util.Vector velocity, org.bukkit.Location toGo, double offsetX, double offsetY, double offsetZ, int count)
-
-
Method Details
-
inherit
-
clone
-
display
public void display(org.bukkit.Location location, org.bukkit.Location toGo) Displays this particle with the given location and location to go without changing this object's toGo variable- Parameters:
location- location to display attoGo- location for this particle to go to after being displayed
-
displayForPlayers
public void displayForPlayers(org.bukkit.Location location, org.bukkit.Location toGo, org.bukkit.entity.Player... players) Displays this particle to the given players with the given location and location to go without changing this object's toGo variable- Parameters:
location- location to display attoGo- location for this particle to go after being displayedplayers- players to display this particle to
-
display
public void display(org.bukkit.Location location, org.bukkit.util.Vector velocity) Displays this particle with the given location and velocity without changing this object's velocity variable- Parameters:
location- location to display atvelocity- velocity of particle
-
displayForPlayers
public void displayForPlayers(org.bukkit.Location location, org.bukkit.util.Vector velocity, org.bukkit.entity.Player... players) Displays this particle to the given players with the given location and velocity without changing this object's velocity variable- Parameters:
location- location to display atvelocity- velocity of particleplayers- players to display this particle to
-
getXYZ
protected org.bukkit.util.Vector getXYZ(org.bukkit.Location location) Description copied from class:ParticleMeant to be overridden by child classes to modify the X/Y/Z values of the packet sent to the player. -
getOffsets
protected org.bukkit.util.Vector getOffsets(org.bukkit.Location location) Description copied from class:ParticleMeant to be overridden by child classes to modify the offset values of the packet sent to the player.- Overrides:
getOffsetsin classParticle- Parameters:
location- the location passed into the display method- Returns:
- the offsetHelper with the modified offset values
-
getPacketSpeed
protected float getPacketSpeed()Description copied from class:ParticleMeant to be overridden by child classes to modify the speed value of the packet sent to the player.- Overrides:
getPacketSpeedin classParticle- Returns:
- the modified speed value
-
getPacketCount
protected int getPacketCount()Description copied from class:ParticleMeant to be overridden by child classes to modify the count value of the packet sent to the player.- Overrides:
getPacketCountin classParticle- Returns:
- the modified count value
-
setLocationToGo
public void setLocationToGo(@Nullable org.bukkit.Location location) - Parameters:
location- where the particle should go after being displayed
-
setLocationToGo
public void setLocationToGo(double x, double y, double z) - Parameters:
x- where you want the particle to go in Xy- where you want the particle to go in Yz- where you want the particle to go in Z
-
setVelocity
public void setVelocity(@Nullable org.bukkit.util.Vector velocity) - Parameters:
velocity- how much you want the particle to travel
-
setVelocity
public void setVelocity(double x, double y, double z) - Parameters:
x- how much you want the particle to travel in Xy- how much you want the particle to travel in Yz- how much you want the particle to travel in Z
-
getLocationToGo
@Nullable public org.bukkit.Location getLocationToGo()- Returns:
- location this particle is using, null if using velocity
-
getVelocity
@Nullable public org.bukkit.util.Vector getVelocity()- Returns:
- velocity this particle is using, null if using location to go
-