Updated API Robot (markdown)

Florian Nücke 2014-04-07 16:17:45 -07:00
parent c0a3927145
commit b1714b6ed8

@ -2,6 +2,8 @@ This API abstracts the computer component of a robot to allow more intuitive int
- `robot.level(): number` - `robot.level(): number`
Gets the current level of the robot, with the fractional part being the percentual progress towards the next level. For example, if this is `1.5`, then the robot is level one, and 50% towards achieving level two. Gets the current level of the robot, with the fractional part being the percentual progress towards the next level. For example, if this is `1.5`, then the robot is level one, and 50% towards achieving level two.
- `robot.name(): string`
Gets the current name of the robot (can be changed using an anvil).
- `robot.detect(): boolean, string` - `robot.detect(): boolean, string`
Tests if there is something in front of the robot. Returns `true` if there is something that would block the robot's movement, `false` otherwise. The second returned value specifies what it is that is in front of the robot and can be one of the following: `entity`, `solid`, `replaceable`, `liquid` and `air`. The first two will block the robots movement, the latter won't. Tests if there is something in front of the robot. Returns `true` if there is something that would block the robot's movement, `false` otherwise. The second returned value specifies what it is that is in front of the robot and can be one of the following: `entity`, `solid`, `replaceable`, `liquid` and `air`. The first two will block the robots movement, the latter won't.
In case of an entity it will either be some living entity, such as a player or monster, or some kind of minecart. In case of an entity it will either be some living entity, such as a player or monster, or some kind of minecart.