Difference between revisions of "Commands.getBlockInfos"
From ComputerCraft Wiki
(Clarified state) |
Magiczocker (Talk | contribs) m |
||
| Line 18: | Line 18: | ||
The blocks are returned in the order of lowest x-co-ord to highest x-co-ord, then lowest z-co-ord to highest z-co-ord, then lowest y-co-ord to highest y-co-ord; that is to say, west to east, then north to south, then lowest altitude to highest altitude. | The blocks are returned in the order of lowest x-co-ord to highest x-co-ord, then lowest z-co-ord to highest z-co-ord, then lowest y-co-ord to highest y-co-ord; that is to say, west to east, then north to south, then lowest altitude to highest altitude. | ||
| − | See also: [[commands.getBlockInfo]](), [ | + | See also: [[commands.getBlockInfo]](), [https://minecraft.gamepedia.com/Block_states Block States @ Minecraft wiki] |
|examples= | |examples= | ||
Latest revision as of 07:07, 4 August 2020
Available only to Command Computers as of ComputerCraft version 1.76, returns a numerically-indexed table containing information on the blocks within the specified world co-ordinates. Each sub-table is formatted per the output of commands.getBlockInfo():
{
state = table state information
name = string block's name,
metadata = number block's metadata
}
A maximum of 4096 (2^12) blocks may be inspected at a time (for example, a 16x16x16 cube); the function will error if the block count exceeds this. The blocks are returned in the order of lowest x-co-ord to highest x-co-ord, then lowest z-co-ord to highest z-co-ord, then lowest y-co-ord to highest y-co-ord; that is to say, west to east, then north to south, then lowest altitude to highest altitude. See also: commands.getBlockInfo(), Block States @ Minecraft wiki | |
| Syntax | commands.getBlockInfos(number x1, number y1, number z1, number x2, number y2, number z2) |
| Returns | table blocks info |
| Part of | ComputerCraft |
| API | commands |
Examples
| |
|---|
| commands.exec - commands.execAsync - commands.list - commands.getBlockPosition - commands.getBlockInfo - commands.getBlockInfos |