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

public abstract class TravellingParticle extends Particle
  • 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

      public TravellingParticle inherit(Particle particle)
      Specified by:
      inherit in interface IParticle
      Overrides:
      inherit in class Particle
      Parameters:
      particle - particle for this object to copy data from
      Returns:
      this object
    • clone

      public abstract TravellingParticle clone()
      Specified by:
      clone in interface IParticle
      Specified by:
      clone in class Particle
    • 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 at
      toGo - 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 at
      toGo - location for this particle to go after being displayed
      players - 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 at
      velocity - 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 at
      velocity - velocity of particle
      players - players to display this particle to
    • getXYZ

      protected org.bukkit.util.Vector getXYZ(org.bukkit.Location location)
      Description copied from class: Particle
      Meant to be overridden by child classes to modify the X/Y/Z values of the packet sent to the player.
      Overrides:
      getXYZ in class Particle
      Parameters:
      location - the location passed into the display method
      Returns:
      the xyzHelper with the modified X/Y/Z values
    • getOffsets

      protected org.bukkit.util.Vector getOffsets(org.bukkit.Location location)
      Description copied from class: Particle
      Meant to be overridden by child classes to modify the offset values of the packet sent to the player.
      Overrides:
      getOffsets in class Particle
      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: Particle
      Meant to be overridden by child classes to modify the speed value of the packet sent to the player.
      Overrides:
      getPacketSpeed in class Particle
      Returns:
      the modified speed value
    • getPacketCount

      protected int getPacketCount()
      Description copied from class: Particle
      Meant to be overridden by child classes to modify the count value of the packet sent to the player.
      Overrides:
      getPacketCount in class Particle
      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 X
      y - where you want the particle to go in Y
      z - 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 X
      y - how much you want the particle to travel in Y
      z - 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