Trails - endorh/aerobatic-elytra GitHub Wiki

Aerobatic Elytras leave behind a short white trail for each of the 4 rockets attached to them. However, it is possible to customize each of these trails separately, by assigning to them a firework rocket with stars.

[!TIP] Since this is purely a cosmetic/vanity feature, the customized trails don't vanish over time nor require fuel/rocket stars/dye. Have fun with them.

Trail mechanics

Trails are created by spawning trail particles behind the player. These particles fall to the ground very slowly, and also have some speed as a result of being propelled from the rockets. They vanish over time, depending on length of your trail effects.

[!NOTE] The default trail is white, small and very short. It's basically not a trail, but rather similar smoke particles to those left by firework rockets when they fly.

Trail effects are derived from the rocket stars set for each rocket of the elytra. If a rocket has multiple rocket stars, their trail particles will have the effect of a random star each.

When the player enters boost mode, they also release a circle of trail particles around them, like some kind of shockwave. These particles are also affected by the trail effects of the rockets. A random rocket is selected every time boost mode is triggered, and its effects are used to customize the boost wave.

Trail effects

Rocket stars can affect the trail in different ways:

Shape

Rocket shape mainly affects the boost wave left behind when entering boost mode, but it also changes the shape of the trail particles themselves.

  • Small Ball: Basic particles, circle boost wave.
  • Large Ball: Basic particles, larger circle boost wave.
  • Star: Star particles, star shaped wave.
  • Creeper: Creeper face particles, creeper face shaped wave.
  • Burst: Basic particles, boost wave as a noisy sphere.

Color

Rocket particles inherit the color from their firework star, and fade to the fade color of the star as they vanish. If the star has no fade color, the particles just become more transparent before vanishing.

Duration

Large ball trail increases the trail length by a factor of 50%. Trail duration is also affected by the Trail ability of the elytra.

Size

Trail size is controlled by the Trail ability of the elytra.

Flicker

If the rocket star has the flicker effect, trail particles will flicker at an increasing rate, rather than slowly disappearing.

Multi trail

If the rocket star has the trail effect (confusing, since the effect itself is called trail on rockets), the rocket will generate 5 parallel trails instead of one.

To improve performance, multi trails have their duration reduced to a 60% of the normal duration, but this can be increased with the Trail ability of the elytra.

The two outer rockets of the elytra generate the 5 parallel trails, parallel to the wings, leaving behind a trail that spans the same as the extended wings.

The two inner rockets of the elytra generate the 5 trails in a cross section, if used together. Each of them generates their side of the X shape. If all 4 rockets generate multi trails, the resulting trail section has more or less the shape of the radii of an hexagon, with the radii parallel to the wings being longer than the other 4.

Customizing the trail

To set the rocket stars for a certain rocket of an elytra, combine a rocket with the desired rocket stars with the Aerobatic Elytra in a crafting table. The relative position of the rocket to the elytra determines which trail will be modified.

The positions to the left and right of the elytra modify the outer rockets of the elytra, while the positions below these modify the inner rockets of the elytra, in their corresponding sides. Other positions are not valid trail recipes.

[!TIP] To remove the trail from a rocket, simply apply a rocket without stars to that position.

[!NOTE] Trail recipes have their own tab in JEI, so you don't need to remember the positions.

Technical Details and Known Limitations

Due to the player's speed while flying, multiple trail particles need to be spawned for every tick in order to make the trail look continuous. This requires the mod to interpolate the trail particles position and speed for the particles spawned between ticks, allowing trails to look smooth, rather than jagged lines. However, the trail from other players may sometimes appear jagged, or even disconnected as a consequence of lag spikes.

When a player bounces off a slime wall, the trail is not interpolated correctly, and as a result, a section of the trail is missing right before the impact.

If multiple players spawn heavy trails, such as multi trails with extended durability, you may experience FPS drops, due to the sheer amount of particles being rendered.