World & blocks · Value
Count blocks
How many blocks of one type are inside a box, and how many blocks the box holds in all.
m.world.count_blocks
In a flow
“When a player uses a command → Count blocks of minecraft:diamond_ore in the mine → Answer.”
When a player uses a command → Count blocks of minecraft:diamond_ore in the mine → Answer.
What it does
How many blocks of one type are inside a box, and how many blocks the box holds in all. It's a value node: no white pins, it works out its answer when a step wired to it needs it. It gives 2 values later steps can use. Find it under World & blocks in the palette.
When to use it
Use it when the flow needs to: how many blocks of one type are inside a box, and how many blocks the box holds in all.
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
- From Location
-
One corner: wire a location in, 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.
- To Location
-
The opposite corner, in the same world.
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.
Values it gives
- Count Number
-
How many of that block. e.g. 12
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
- In the box Number
-
How many blocks the box holds. e.g. 125
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