minecraft:trail

Causes an entity to leave a trail of blocks as it moves about the world. Obeys Mob Griefing rules.

Properties

PropertyTypeDefaultWhat it does
spawn_filterObject 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.
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
block_typeText"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_offsetList 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.
xDecimal0
yDecimal0
zDecimal0
replaceable_blocksList 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.
radiusInteger-1 to 16-1When 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_blocksBooleanfalseWhen 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:

Related components