Creating Your First Particle Effect
The Particles API provides a powerful, stateful controller for managing complex, animated 3D particle effects. It utilizes a highly modular builder pattern, allowing you to easily snap together geometric shapes, mathematical animations, and different visual rendering methods.
Building a Basic Effect
To start off, you will need to create a Particles instance using Particles.builder(). At a minimum, you must define an origin, a shape, and a renderer.
[IMG?]
Dynamic Origins & Animations
You can make effects far more dynamic by passing a Supplier<Location> for the origin, which allows the effect to seamlessly follow a moving player or entity. We can also apply Transformers to animate the shape over time.
[VIDEO?]
Builder Configuration Methods
The Particles.Builder contains a wide variety of methods to fine-tune exactly how your effect behaves, renders, and cleans itself up.
Method | Description |
|---|---|
| Sets a static world location as the central anchor point for the effect. |
| Sets a dynamic location supplier. Evaluated every tick, allowing the effect to track moving entities. |
| (Required) Sets the geometric shape logic (e.g., |
| (Required) Sets the implementation responsible for displaying the points in the world. |
| Adds a custom spatial modifier to the pipeline (applied sequentially). Useful for complex mathematical animations. |
| Sets a static Bukkit |
| Sets a procedural color logic for dynamic, per-particle tinting and gradients. |
| Quickly adds a static rotation transformation (in radians) around the respective axes. |
| Quickly adds a static scaling multiplier transformation to the coordinates. |
| Quickly adds a static spatial offset transformation to the coordinates. |
| Sets the delay in server ticks between each animation frame. Defaults to |
| Sets the total lifetime of the effect in ticks. Set to |
| If true, calculates future frame motion vectors for smooth client-side interpolation (creates |
| Sets a static list of players who are allowed to see the effect. |
| Sets a dynamic supplier for viewers, allowing players to phase in and out of seeing the effect based on conditions. |
| A dynamic condition evaluated every tick. If it returns |
| Validates the configuration and produces the final |