commands.getBlockPosition
From ComputerCraft Wiki
Revision as of 16:19, 16 February 2015 by MKlegoman357 (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=commands.getBlockPosition |args= |returns={{type|number}} x, {{type|number}} y, {{type|number}} z |api=commands |addon=ComputerCraft |desc=Avail...")
Function commands.getBlockPosition | |
Available only to Command Computers, returns the MineCraft world co-ordinates of the computer running the command. | |
Syntax | commands.getBlockPosition() |
Returns | number x, number y, number z |
Part of | ComputerCraft |
API | commands |
Examples
Example | |
Prints the coordinates of the Command Computer running the function. | |
Code |
local x, y, z = commands.getBlockPosition() print( "Command Computer's position:" ) print("X: ", x) print("Y: ", y) print("Z: ", z) |
Commands API Functions |
---|
commands.exec - commands.execAsync - commands.list - commands.getBlockPosition - commands.getBlockInfo - commands.getBlockInfos |