Events and flow
An event starts each feature. Wires from its then lead to steps, and each step’s then leads to the next. Everything runs on the server.
Steps
A flow output wired to several steps runs them one after another, top to bottom as the canvas shows them.
If goes on through true or false by its condition.
For each nearby runs the steps after its each once for every player or mob within Within blocks of its position, a box around it. Wire its Player (or Entity) into those steps to act on each one. Only those steps can read it, and nothing runs after the loop: put steps that run once before it.
Count nearby gives how many players or mobs the same box holds, for a step that runs once, such as a warning when a crowd gathers. When it counts players, a player counts themselves.
Values
Value wires carry a player, an entity, a world, a position, a number, a true or false, an item or a block into an input. One output can feed many inputs.
Select gives Then while If is true, otherwise Else. Its type follows what you wire into it.
A value is worked out each time a wire reads it, so a Random chance wired into two Ifs rolls twice, and a Health read after Heal reads the health it left. To give several steps one roll, or one reading, put Keep value in the flow before them: it works out what is wired into it as the flow passes, and every wire from it gives that same value to the steps after it.
Inputs left unwired
| Input | Unwired, it is |
|---|---|
| Player | the event’s player |
| Entity | the event’s entity, or its player when it has none |
| World | the event’s world |
| Position | the event’s position |
| Number | the number set on the node |
An event with no position of its own, such as When item is used, needs Position wired, such as from Player position.
Inside a function, they are the function’s inputs of that type.
Mobs lists
An event with Mobs left empty runs for every mob, animal and player. When mob steps on block leaves players out.
Ticks
20 ticks is one second.
Every N ticks runs once per player online, every Ticks ticks. With For players set, it runs only for players wearing or holding one of its Items. Armor counts in its own slot. Keep Ticks as high as the feature allows, and see Performance for what costs the most.
Every N ticks for mobs runs the same way for each loaded mob and animal, or only those in its Mobs.
Every N ticks for blocks runs for each placed block of its Blocks in loaded chunks, with the block’s Position. Use it for beacons, generators and blocks that hurt or heal players near them. On Java Edition a block starts ticking once placed, so ores and trees from world generation don’t tick. Buttons, pressure plates, doors, leaves and blocks that fall like sand tick on their own, so it can’t list them.
When player steps on block runs every tick for each player standing on one of its Blocks, and When mob steps on block for each mob and animal on one, so keep what they do small. Performance has tips.
Jumps, sleep and chat
When player jumps runs as a player leaves the ground. A press in mid-air isn’t seen, so it can’t make a double jump.
When player falls asleep runs once as a player falls asleep in a bed. When player wakes up runs as they get out of bed, in the morning or before. For a reward after a full night, check World is day after it.
When player chats runs for messages that contain its text, ignoring case, or for every message when the text is empty. Cancel event hides the message. It isn’t available on Bedrock Edition.
Picking up and dropping items
When player picks up item runs as a player picks up one of its Items from the ground, or any item when it lists none. When player drops item runs as a player throws one out of their inventory. Position is the player’s. Neither can stop the item.
Changing dimension
When player changes dimension runs as a player arrives in another dimension, through a portal or a teleport, for the dimension To names or any. World and Position are where they arrive. On Java Edition, leaving the End through its exit portal and respawning after death don’t run it: Java counts both as respawning.