minecraft:trail
Causes an entity to leave a trail of blocks as it moves about the world. Obeys Mob Griefing rules.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
spawn_filter | Object or List of object | {"AND": null, "NOT": null, "OR": null, "all": null, "all_… | One or more conditions that must be met in order to cause the chosen block type to spawn. |
test | Text | — | The name of the test to apply. |
subject | Boolean or Integer or Decimal or Text | — | The subject of this filter test. |
operator | Boolean or Integer or Decimal or Text | — | The comparison to apply with 'value'. |
domain | Boolean or Integer or Decimal or Text | — | The domain the test should be performed in. |
value | Boolean or Integer or Decimal or Text | — | The value being compared with the test. |
block_type | Text | "air" | The type of block that is spawned as a trail behind the entity. Solid blocks cannot be spawned at an offset of (0, 0, 0). |
spawn_offset | List of decimal or Object | [0, 0, 0] | The offset from the entity's current position at which to spawn the block, capped at 16 blocks away. |
x | Decimal | 0 | |
y | Decimal | 0 | |
z | Decimal | 0 | |
replaceable_blocks | List of object or text | [] | A list of blocks that can be replaced by the trail block. If the block at the spawn offset is not in this list, the trail block will not spawn. If omitted it will default to only air blocks. |
radius | Integer-1 to 16 | -1 | When provided, the trail spawns blocks across a (2 * radius + 1) by (2 * radius + 1) horizontal area centered on the spawn offset. Uses the legacy four-corner sampling when omitted. |
force_replace_matched_blocks | Boolean | false | When true, the trail will replace blocks that match the replaceable blocks list even if normal placement rules prevent it. |
Example from the game files
This is how vanilla Snow Golem uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:trail": {
"block_type": "minecraft:snow_layer",
"spawn_filter": {
"operator": "<",
"test": "is_temperature_value",
"value": 0.81
}
}
}Used by 1
Vanilla entities with minecraft:trail in their definition: