World & blocks · Value
Find the nearest block
Look around a location for the nearest block of a type. Ties go to the lowest x, then y, then z.
m.world.find_block
In a flow
“When a player uses a command → Find the nearest minecraft:diamond_ore within 10 → Teleport them there.”
When a player uses a command → Find the nearest minecraft:diamond_ore within 10 → Teleport them there.
What it does
Look around a location for the nearest block of a type. Ties go to the lowest x, then y, then z. It's a value node: no white pins, it works out its answer when a step wired to it needs it. It gives 3 values later steps can use. Find it under World & blocks in the palette.
When to use it
Use it when the flow needs to: look around a location for the nearest block of a type. Ties go to the lowest x, then y, then z.
When not to
For a value that never changes, type it into the setting instead of wiring a node.
Typical wiring
Sockets: settings you can wire
- Around Location
-
Where: wire a location in, like Location from Player location, or type world x y z.
What goes there: Type it in the side panel, or wire in a location. e.g. world 10.5 64 -3.2
If it's empty: Optional. Left empty and unwired, the step runs without it.
- Radius Number
-
How far to look, in blocks, from 1 to 16.
What goes there: Type it in the side panel, or wire in a number. e.g. 42
If it's empty: Optional. Left empty and unwired, it uses 5.
Connects fromA member's variablesAccept applicationActive membersAddAdd a forum tagAdd a labelAdd a row to a Google SheetAdd a staff noteand 501 more
Values it gives
- Found Yes / no
-
True when one was within the radius. e.g. true
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAdd a forum tagAdd onboarding questionAdd to a counterAlarms that are dueAndAutoMod: Discord's word listsBluesky latest postBoard as emojiand 573 more
- Location Location
-
Where it is. e.g. world 3 62 -1
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAccept applicationAdd a forum tagAdd a labelAdd a Notion pageAdd a row to a Google SheetAdd a staff noteAdd a stickerAdd a Trello cardand 554 more
- Distance Number
-
How many blocks away it is. e.g. 3.5
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAccount ageActive membersAddAdd answer to formAdd soundboard soundAdd timeAdd to a counterAdd to a leaderboardand 719 more