Class ParticleUtil

java.lang.Object
com.hypixel.hytale.server.core.universe.world.ParticleUtil

public class ParticleUtil extends Object
A utility class that contains a variety of useful particle methods.
  • Field Details

    • DEFAULT_PARTICLE_DISTANCE

      public static final double DEFAULT_PARTICLE_DISTANCE
      The default distance, in blocks, to send particle effects to players.
      See Also:
  • Constructor Details

    • ParticleUtil

      public ParticleUtil()
  • Method Details

    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, @Nonnull org.joml.Vector3dc position, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all nearby players
      Parameters:
      name - The name of the particle system to spawn.
      position - The position to spawn the particles at.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, @Nonnull org.joml.Vector3dc position, float yaw, float pitch, float roll, float scale, float maxDuration, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, @Nonnull org.joml.Vector3dc position, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      name - The name of the particle system to spawn.
      position - The position to spawn the particles at.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, @Nonnull org.joml.Vector3dc position, @Nullable Ref<EntityStore> sourceRef, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      name - The name of the particle system to spawn.
      position - The position to spawn the particles at.
      sourceRef - The entity reference of the source entity to ignore.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, @Nonnull org.joml.Vector3dc position, @Nonnull Rotation3f rotation, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      name - The name of the particle system to spawn.
      position - The position to spawn the particles at.
      rotation - The rotation of the particles.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, @Nonnull org.joml.Vector3dc position, @Nonnull Rotation3f rotation, @Nullable Ref<EntityStore> sourceRef, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      name - The name of the particle system to spawn.
      position - The position to spawn the particles at.
      rotation - The rotation of the particles.
      sourceRef - The entity reference of the source entity to ignore.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(String name, @Nonnull org.joml.Vector3dc position, float yaw, float pitch, float roll, @Nullable Ref<EntityStore> sourceRef, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      name - The name of the particle system to spawn.
      position - The position to spawn the particles at.
      yaw - The yaw of the particles' rotation.
      pitch - The pitch of the particles' rotation.
      roll - The roll of the particles' rotation.
      sourceRef - The entity reference of the source entity to ignore.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, @Nonnull org.joml.Vector3dc position, float yaw, float pitch, float roll, float scale, @Nonnull Color color, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      name - The name of the particle system to spawn.
      position - The position to spawn the particles at.
      yaw - The yaw of the particles' rotation.
      pitch - The pitch of the particles' rotation.
      roll - The roll of the particles' rotation.
      scale - The scale of the particle.
      color - The color of the particles.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull WorldParticle particles, @Nonnull org.joml.Vector3dc position, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      particles - The WorldParticle instance representing the particles.
      position - The position to spawn the particles at.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull WorldParticle particles, @Nonnull org.joml.Vector3dc position, @Nullable Ref<EntityStore> sourceRef, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      particles - The WorldParticle instance representing the particles.
      position - The position to spawn the particles at.
      sourceRef - The entity reference of the source entity to ignore.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffects

      public static void spawnParticleEffects(@Nonnull WorldParticle[] particles, @Nonnull org.joml.Vector3dc position, @Nullable Ref<EntityStore> sourceRef, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      particles - The WorldParticle instance representing the particles.
      position - The position to spawn the particles at.
      sourceRef - The entity reference of the source entity to ignore.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull WorldParticle particles, @Nonnull org.joml.Vector3dc position, float yaw, float pitch, float roll, @Nullable Ref<EntityStore> sourceRef, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      particles - The WorldParticle instance representing the particles.
      position - The position to spawn the particles at.
      yaw - The yaw of the particles' rotation.
      pitch - The pitch of the particles' rotation.
      roll - The roll of the particles' rotation.
      sourceRef - The entity reference of the source entity to ignore.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, double x, double y, double z, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      name - The name of the particle system to spawn.
      x - The X position of the particle.
      y - The Y position of the particle.
      z - The Z position of the particle.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, double x, double y, double z, @Nullable Ref<EntityStore> sourceRef, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      name - The name of the particle system to spawn.
      x - The X position of the particle.
      y - The Y position of the particle.
      z - The Z position of the particle.
      sourceRef - The entity reference of the source entity to ignore.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, double x, double y, double z, float rotationYaw, float rotationPitch, float rotationRoll, @Nullable Ref<EntityStore> sourceRef, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      name - The name of the particle system to spawn.
      x - The X position of the particle.
      y - The Y position of the particle.
      z - The Z position of the particle.
      rotationYaw - The yaw of the particles' rotation.
      rotationPitch - The pitch of the particles' rotation.
      rotationRoll - The roll of the particles' rotation.
      sourceRef - The entity reference of the source entity to ignore.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, double x, double y, double z, float rotationYaw, float rotationPitch, float rotationRoll, float scale, @Nullable Color color, @Nullable Ref<EntityStore> sourceRef, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to spawn a particle effect at the given location for all the given player clients.
      Parameters:
      name - The name of the particle system to spawn.
      x - The X position of the particle.
      y - The Y position of the particle.
      z - The Z position of the particle.
      rotationYaw - The yaw of the particles' rotation.
      rotationPitch - The pitch of the particles' rotation.
      rotationRoll - The roll of the particles' rotation.
      scale - The scale of the particle.
      color - The color of the particle.
      sourceRef - The entity reference of the source entity to ignore.
      playerRefs - The list of player instances to send this particle to.
      componentAccessor - The ComponentAccessor<EntityStore> for component access.
    • spawnParticleEffect

      public static void spawnParticleEffect(@Nonnull String name, double x, double y, double z, float rotationYaw, float rotationPitch, float rotationRoll, float scale, @Nullable Color color, @Nullable Ref<EntityStore> sourceRef, @Nonnull List<Ref<EntityStore>> playerRefs, @Nonnull ComponentAccessor<EntityStore> componentAccessor, float maxDuration)