Trails
Trails are visual effects that follow an entity as it moves. They are defined as client-side asset files and can be referenced by the palladium:trail ability or by a size change type.
Creating a Trail
Trail files go in your resource pack at:
{
"spacing": 1,
"lifetime": 20,
"requires_movement": true,
"renderer": {
"type": "palladium:gradient",
"color": "#ff0000"
}
}
A single file can also define multiple independent trails using a list:
[
{
"spacing": 1,
"lifetime": 20,
"renderer": { "type": "palladium:gradient", "color": "#ff0000" }
},
{
"spacing": 0.5,
"lifetime": 10,
"renderer": { "type": "palladium:after_image", "opacity": 0.3 }
}
]
Settings
spacing (optional, default: 1) is the distance in blocks between spawned trail segments.
lifetime (optional, default: 20) is how many ticks each segment stays visible before fading out.
requires_movement (optional, default: true) when true, new segments are only spawned while the entity is actually moving.
tick_delay (optional) delays segment spawning by this many ticks after the trail becomes active. Accepts a plain integer (ticks) or a time string: "1s" (seconds), "20t" (ticks), "1m" (minutes).
Using Trails
Reference a trail by its identifier (namespace:filename) in either of these places:
- The
palladium:trailability'strailfield -- see the Abilities page. - The
trailslist in a size change type.
Trail Renderers
The renderer object inside each trail entry defines how it looks. The type field selects the renderer.
After Image Trail
palladium:after_image- Settings
- Example
| Key | Type | Description | Required | Fallback |
|---|---|---|---|---|
color | Color | Defines the color/tint of the after image | #ffffff | |
opacity | Float | Starting opacity of the after image | 0.5 |
{
"type": "palladium:after_image",
"color": "#ff0000",
"opacity": 0.2
}
Gradient Trail
palladium:gradient- Settings
- Example
| Key | Type | Description | Required | Fallback |
|---|---|---|---|---|
color | Color | Defines the color of the gradient | #ffffff | |
opacity | Float | Starting opacity of the gradient | 0.5 | |
orientation | horizontalvertical | Defines the orientation in relation to the entity in which the gradient will render | VERTICAL | |
offset | Float | Defines where the gradient will start in relation to entity hitbox. 0.5 is equal to the center. | 0.5 |
{
"type": "palladium:gradient",
"color": "#ff0000",
"opacity": 0.7,
"orientation": "horizontal",
"offset": 0.2
}
Lightning Trail
palladium:lightning- Settings
- Example
| Key | Type | Description | Required | Fallback |
|---|---|---|---|---|
amount | Integer | Defines how many lightnings will follow the player | 10 | |
render_settings | Laser Renderer Settings | The render settings for the lightning. | / |
{
"type": "palladium:lightning",
"amount": 7,
"render_settings": {
"glow": "#0000ff",
"size": 2
}
}
Laser Renderer Settings
The lightning trail's render_settings field uses a laser renderer. It draws a rectangular beam between trail segments and supports two visual layers: a solid inner core and a softer outer glow.
"render_settings": {
"core": "#ffffff",
"glow": { "color": "#4444ff", "opacity": 0.6 },
"bloom": 3,
"size": 2,
"rotation": 0,
"rotation_speed": 0
}
core (optional) is the inner beam. Can be a plain hex color string as shorthand, or a full laser part object. Defaults to white at full opacity.
glow (optional) is the outer glow layer rendered around the core. Same format as core. Defaults to white at full opacity.
bloom (optional, default: 1) controls the number of additional glow passes rendered around the beam. Range 0 to 10. Higher values produce a wider, softer glow.
size (optional, default: 1) is the beam width and height in voxels (1 voxel = 1/16 of a block). Can be a single number for a square beam, or [width, height] for a rectangular one.
rotation (optional, default: 0) is a static rotation of the beam in degrees (0 to 360).
rotation_speed (optional, default: 0) makes the beam spin continuously. Value is degrees per tick.
Laser Part
Both core and glow accept either a plain hex color string (shorthand for full opacity, no effects) or a full object:
{
"color": "#ff0000",
"opacity": 0.8,
"rainbow": 0.5,
"pulse": {
"scale": 0.3,
"frequency": 2.0
}
}
color (optional, default: "#ffffff") is the color of the layer.
opacity (optional, default: 1) is the opacity of the layer, from 0 to 1.
rainbow (optional, default: 0) cycles the color through the full Minecraft dye palette. Value is a speed from 0 (off) to 1 (fast). Also accepts true as shorthand for 1.
pulse (optional) makes the layer rhythmically scale in and out.
scale(optional, default:1) is the amplitude of the pulse.frequency(optional, default:1) is the speed of the pulse, from0to10.