Skip to content

Actions

This page documents all available actions for the timeline.

Places a single block.

{
"at": 0,
"do": "place",
"pos": [5, 1, 5],
"block": {
"id": "minecraft:lever",
"powered": false,
"face": "floor"
}
}
FieldTypeDescription
pos[x, y, z]Block position
blockobjectBlock with ID and properties

Places multiple blocks atomically in the same tick. Ideal for setup phases.

{
"at": 0,
"do": "placeEach",
"blocks": [
{ "pos": [0, 0, 0], "block": { "id": "minecraft:stone" } },
{ "pos": [1, 0, 0], "block": { "id": "minecraft:dirt" } },
{ "pos": [2, 0, 0], "block": { "id": "minecraft:grass_block" } }
]
}
FieldTypeDescription
blocksarrayList of block placements
blocks[].pos[x, y, z]Position
blocks[].blockobjectBlock definition

When to use placeEach:

  • Initial block placement at tick 0
  • When multiple blocks must exist simultaneously
  • For atomic operations (all or nothing)

Fills a region with a block type.

{
"at": 0,
"do": "fill",
"region": [[0, 0, 0], [10, 0, 10]],
"with": { "id": "minecraft:stone" }
}
FieldTypeDescription
region[[x1,y1,z1], [x2,y2,z2]]Area to fill
withobjectBlock definition

Note: Coordinates can be swapped - Flint automatically determines min/max.

Removes a block (replaces with air).

{
"at": 5,
"do": "remove",
"pos": [5, 1, 5]
}
FieldTypeDescription
pos[x, y, z]Position of block to remove

Uses an item on a block face. This triggers the server’s interaction logic.

Simple Mode - Item is specified directly:

{
"at": 5,
"do": "useItemOn",
"pos": [3, 1, 3],
"face": "top",
"item": "minecraft:honeycomb"
}

Advanced Mode - Uses the player’s current held item:

{
"at": 5,
"do": "useItemOn",
"pos": [3, 1, 3],
"face": "north"
}
FieldTypeRequiredDescription
pos[x, y, z]YesBlock position
facestringYesBlock face
itemstringNoItem for simple mode

Block Faces:

FaceDirection
top+Y (above)
bottom-Y (below)
north-Z
south+Z
east+X
west-X

Sets an item in a player slot.

{
"at": 3,
"do": "setSlot",
"slot": "hotbar1",
"item": "minecraft:diamond_pickaxe",
"count": 1
}

To clear a slot:

{
"at": 3,
"do": "setSlot",
"slot": "hotbar1"
}
FieldTypeRequiredDescription
slotstringYesSlot name
itemstringNoItem ID (empty = clear slot)
countnumberNoAmount (default: 1)

Selects a hotbar slot (1-9).

{
"at": 4,
"do": "selectHotbar",
"slot": 2
}
FieldTypeDescription
slotnumberHotbar slot (1-9)

Verifies block states at specified positions.

{
"at": 10,
"do": "assert",
"checks": [
{
"pos": [5, 1, 5],
"is": {
"id": "minecraft:redstone_wire",
"power": 15,
"north": "side"
}
},
{
"pos": [6, 1, 5],
"is": { "id": "minecraft:air" }
}
]
}
FieldTypeDescription
checksarrayList of checks
checks[].pos[x, y, z]Position
checks[].isobjectExpected block

Behavior:

  • Block ID is checked (with or without minecraft: prefix)
  • Only specified properties are checked
  • Unspecified properties are ignored
  • On failure, the test stops immediately
{
"timeline": [
{ "at": 0, "do": "place", "pos": [0,0,0], "block": {"id": "minecraft:sand"} },
{ "at": 1, "do": "remove", "pos": [0,-1,0] },
{ "at": 5, "do": "assert", "checks": [
{ "pos": [0,0,0], "is": {"id": "minecraft:air"} },
{ "pos": [0,-1,0], "is": {"id": "minecraft:sand"} }
]}
]
}
{
"at": [10, 20, 30, 40, 50],
"do": "assert",
"checks": [
{ "pos": [5, 1, 5], "is": { "id": "minecraft:redstone_lamp", "lit": true } }
]
}
ComponentDelay (game ticks)
Redstone wire0 (instant)
Repeater (1 tick)2
Repeater (4 ticks)8
Comparator2
Observer2